Multi-key inner product function encryption method and system

By embedding random factors and secret sharing technology in the key generation process, the problems of privacy protection and computing efficiency in multi-user vector internal product computing scenarios are solved, and efficient and secure vector internal product computing is achieved.

CN119945671AActive Publication Date: 2025-05-06HUNAN UNIV +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510027417.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-05-06
Estimated Expiration
2045-01-08

AI Technical Summary

Technical Problem

The prior art is difficult to safely and efficiently support vector internal product calculation in multi-user vector internal product computing scenarios, especially while protecting the vector privacy of vector providers and vector computing parties.

Method used

By embedding different eliminating random factors in the key generation process, a unique key is generated for each user, and using secret sharing technology to ensure vector privacy of the vector compute. This method allocates computing tasks between cloud servers, performs partial calculations through decryption keys and trap gates, and finally completes the calculation of the vector internal product result between unconspired cloud servers.

Benefits of technology

It realizes the rapid and accurate calculation of vector internal products in multi-user scenarios, while protecting the vector privacy of vector providers and vector computing parties, without the need for complex homomorphic calculations and bilinear pair calculations, and the overall operation efficiency is high.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119945671A_ABST
    Figure CN119945671A_ABST
Patent Text Reader

Abstract

The invention provides a multi-key inner product function encryption method and system, and the method comprises the steps: enabling each user to have different keys through embedding different random factors capable of being eliminated in a key, and guaranteeing the vector privacy of a vector calculation party through secret sharing; meanwhile, according to the scheme, complex homomorphic calculation and bilinear pairwise calculation do not need to be operated, and the overall operation efficiency is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of encryption technology, and in particular relates to a multi-key inner product function encryption method and system. Background Art

[0002] Vector inner product calculation is widely used in machine learning, information retrieval, computer vision and other fields. For example, in the field of information retrieval, the source data and the data to be retrieved are encoded into vectors, and then the vector inner product is used to measure the similarity between two objects (such as text, images, etc.). In addition, with the widespread development of technologies such as the Internet of Things and mobile Internet, the scale of data is constantly increasing. In order to complete machine learning, information retrieval and other services, there is an urgent need for a large-capacity, high-performance data processing platform to complete vector inner product calculation.

[0003] As a flexible and efficient computing model, cloud computing provides good technical support for large-scale vector inner product calculations. However, as massive amounts of data are gathered in the cloud, data security issues are becoming increasingly severe. In order to ensure the privacy of vector data and the feasibility of vector inner products, researchers have proposed technologies such as differential privacy, homomorphic encryption, secure multi-party computing, and inner product functional encryption. Among these technologies, the random noise introduced by differential privacy will reduce the calculation accuracy, secure multi-party computing technology faces expensive communication costs, and homomorphic encryption has high computational complexity. In contrast, inner product functional encryption has lower communication and computing costs.

[0004] Vector inner product functional encryption is a special case of functional encryption, which allows the inner product value of the vector to be obtained without decrypting the vector, and has a good application prospect. For example, when conducting medical data analysis, in order to ensure the privacy of medical data, the hospital encodes the case data into a vector, and then encrypts it through the vector inner product functional encryption technology and outsources it to the cloud platform. When a research institution wants to obtain cases related to patient A, the research institution uses the same data encoding method to encode patient A's data into a vector, and then uses the vector inner product functional encryption to ensure the data privacy of the patient. In this way, the cloud platform can calculate the vector inner product through the vector inner product functional encryption technology without knowing the vector plaintext, and return the case most relevant to patient A.

[0005] The inventors found that the vector inner product functional encryption mainly adopts the following strategy: the vector provider encrypts its own vector p and sends it to the cloud server, the vector calculator forms a trapdoor for its own vector q and sends it to the cloud server, and the cloud server obtains the inner product value of p and q based on the ciphertext vector and the trapdoor. However, the current vector inner product functional encryption is difficult to safely and efficiently support the vector inner product calculation scenarios of multiple users. For example, the vector inner product functional encryption proposed in the document "Simple Functional Encryption Schemes for Inner Products" can ensure the efficiency of vector inner product calculation, but it requires all users to use the same key for vector encryption in the multi-user vector inner product calculation scenario. At the same time, this method needs to complete the vector inner product calculation under the premise of knowing the plaintext of vector q, and cannot protect the vector privacy of the vector calculator. Summary of the invention

[0006] The embodiments of the present invention provide a multi-key inner product function encryption method and system to solve the problem that existing solutions are difficult to safely and efficiently support vector inner product calculation scenarios for multiple users.

[0007] According to a first aspect of an embodiment of the present invention, there is provided a multi-key inner product function encryption system, comprising:

[0008] A key generation center, which is used to generate a key for each vector provider and generate a unique private key for each vector calculator, calculate a decryption key based on the private key, and send the decryption key to the first cloud server and the second cloud server;

[0009] A vector provider, which is used to encrypt its own vector based on the key generated by the key generation center, obtain the ciphertext vector, and send the ciphertext vector to the first cloud server and the second cloud server;

[0010] A vector calculation party, which is used to generate a trapdoor for its own vector through a trapdoor generation algorithm based on a private key generated by a key generation center, obtain a first trapdoor and a second trapdoor, send the first trapdoor to the first cloud server, and send the second trapdoor to the second cloud server;

[0011] The first cloud server is configured to obtain a first part of the vector inner product result through decryption processing based on the first trapdoor received from the vector calculation party, in combination with the ciphertext vector from the vector provider and the decryption key, and send the result to the second cloud server;

[0012] The second cloud server is used to obtain the second part of the vector inner product result through decryption processing based on the second trapdoor received from the vector calculation party, in combination with the ciphertext vector and the decryption key from the vector provider; and to obtain the inner product result through decryption processing based on the second part of the vector inner product result, in combination with the first part of the vector inner product result received, and send it to the vector calculation party.

[0013] Furthermore, the calculation of the inner product result of the first part of the vectors and the inner product result of the second part of the vectors is specifically performed using the following formula:

[0014]

[0015] Among them, l z represents the inner product result of the zth part of the vector, where z is 1 or 2; d is the vector dimension; ct i,0 [k] is the ct in the ciphertext vector i,0 The kth position of is the cyclic group An element in ct i,1 [k] is the ct in the ciphertext vector i,1 The kth position of is the cyclic group An element in For the zth trapdoor The kth position of An integer in ; For the zth trapdoor The kth position of is an integer in ; dk[j] is the jth bit of the decryption key, where k is in the range [1, d], j is in the range [1, n], and n is the number of bits of the decryption key.

[0016] Furthermore, the inner product result based on the second part of the vector is obtained through decryption processing in combination with the received inner product result of the first part of the vector. Specifically, the second cloud server constructs a mapping table, locates the product of the inner product result of the first part of the vector and the inner product result of the second part of the vector based on the mapping table, and obtains the final inner product value.

[0017] Furthermore, a decryption key is calculated based on the private key, specifically: an integer is randomly selected from a pre-constructed positive integer group as the private key of the vector calculator, and the decryption key is calculated based on the private key and the master key of the key generation center.

[0018] Furthermore, the system needs to meet the following constraints: the key generation center, the vector provider and the vector calculation party are trustworthy, the first cloud server and the second cloud server are semi-trustworthy, and there is no collusion between the first cloud server and the second cloud server.

[0019] According to a second aspect of an embodiment of the present invention, a multi-key inner product function encryption method is provided, which is based on the above-mentioned multi-key inner product function encryption system, and the method includes:

[0020] In response to a vector calculation request from a vector calculation party, based on the first trapdoor received from the vector calculation party, in combination with the ciphertext vector from the vector provider and the decryption key, a first part of the vector inner product result is obtained through decryption processing; and based on the second trapdoor received from the vector calculation party, in combination with the ciphertext vector from the vector provider and the decryption key, a second part of the vector inner product result is obtained through decryption processing; wherein the calculation of the first part of the vector inner product result is located on the first cloud server; and the calculation of the second part of the vector inner product result is located on the second cloud server;

[0021] Based on the obtained first part of the vector inner product result and the second part of the vector inner product result, an inner product result is obtained through decryption processing; wherein the calculation of the inner product result is located on the second cloud server.

[0022] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, comprising a memory, a processor and a computer program stored and running on the memory, wherein the processor implements the multi-key inner product function encryption method when executing the program.

[0023] According to a fourth aspect of an embodiment of the present invention, there is provided a non-transitory computer-readable storage medium having a computer program stored thereon, which implements the multi-key inner product function encryption method when executed by a processor.

[0024] One or more of the above technical solutions have the following beneficial effects:

[0025] The present invention provides a multi-key inner product function encryption method and system. The scheme ensures that each user has a different key by embedding different removable random factors in the key, and at the same time uses secret sharing to ensure the vector privacy of the vector calculator.

[0026] The solution of the present invention can quickly and accurately calculate the vector inner product under the premise of protecting the vector privacy of the vector provider and the vector calculator;

[0027] The solution described in the present invention does not need to run complex homomorphic calculations and bilinear pairing calculations, and has high overall operating efficiency.

[0028] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0030] Figure 1 A schematic diagram of the structure of a multi-key inner product function encryption system described in an embodiment of the present invention;

[0031] Figure 2 This is a flow chart of a multi-key inner product function encryption method described in an embodiment of the present invention. DETAILED DESCRIPTION

[0032] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0033] It should be noted that the terms used herein are for describing specific embodiments only and are not intended to be limiting of exemplary embodiments according to the present invention.

[0034] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0035] Terminology explanation:

[0036] No collusion: This means that under normal circumstances, cloud servers will not cooperate with each other to leak user data or take other actions that harm user interests.

[0037] Parameter meaning:

[0038] The meanings of the parameters involved in the embodiment are explained below through Table 1:

[0039] Table 1 Parameter meaning

[0040]

[0041] The embodiment of the present invention provides a multi-key inner product function encryption system. It mainly adopts the following technical concepts:

[0042] In the key generation process, different removable random factors are embedded to ensure that each vector provider and vector calculator has different keys. Secondly, this method uses secret sharing technology to ensure the vector privacy of the vector calculator. The entire method does not need to run complex homomorphic calculations and bilinear pairing calculations, and the overall operation efficiency is high. While safely implementing the vector inner product function, it can ensure that each vector provider and vector calculator has different keys. The operation process of this method involves the interaction between four entities, namely the key generation center, the vector provider, the vector calculator, and two non-colluding cloud servers. The key generation center is trusted, the vector provider and the vector calculator are honest, that is, they will not deliberately disclose their keys to other entities, and the cloud server is semi-trusted, that is, they will honestly execute the predefined protocols and algorithms, but will speculate the plaintext value of the vector based on the execution process.

[0043] Specifically, Figure 1 As shown, the multi-key inner product function encryption system includes:

[0044] A key generation center, which is used to generate a key for each vector provider and generate a unique private key for each vector calculator, calculate a decryption key based on the private key, and send the decryption key to the first cloud server and the second cloud server;

[0045] In a specific implementation, the key generation center runs the initialization algorithm (Setup) in advance to generate the system's master key θ, and provides a method for each vector Generate a unique public-private key pair (pk i ,sk i ); and, by running the key generation algorithm (KeyGen) to calculate the square for each vector Generate a unique private keyδ j , and calculate the decryption key dk = (dk1, ..., dk n ) and then sent to the first cloud server CS1 and the second cloud server CS2.

[0046] Specifically, first, the key generation center inputs the security parameter λ to generate a cyclic group with order p and generator g And from the group A random integer θ is selected as the master key, where p is a large prime number that is much larger than the vector inner product value. is the group of positive integers modulo p; then, for each vector providing The key generation center A set of d-dimensional vectors are randomly generated in Finally, the key generation center is W i Generate a public-private key pair (pk i ,ski ), where the public key Private key sk i =s i ×θ.

[0047] The key generation algorithm of the key generation algorithm is specifically as follows:

[0048] For each vector calculation The key generation center Randomly select an integer δ from j As R j The private key of , and calculate dk j =(>×δ j ) -1 modp-1. When the keys of all vector calculation parties are generated, the final decryption key dk=(dk1,…,dk n ) will be sent to cloud server CS1 and cloud server CS2.

[0049] A vector provider, which is used to encrypt its own vector based on the key generated by the key generation center, obtain the ciphertext vector, and send the ciphertext vector to the first cloud server and the second cloud server;

[0050] In the specific implementation, it is assumed that there are m vector providers in the system, and the set of all vector providers is represented by It indicates that, Each vector provider is responsible for encrypting its own vector to form a ciphertext vector and sending the ciphertext vector to the cloud server. i Possess a public-private key pair (pk i ,sk i ), which runs the vector encryption algorithm (Enc) to encrypt its own vector p i is the ciphertext vector CT i , and the ciphertext vector CT i It is sent to cloud server CS1 and cloud server CS2 at the same time.

[0051] Specifically, the generation of the ciphertext vector is as follows:

[0052] Through the vector encryption algorithm CT i ←Enc(sk i ,pk i ,p i ): vector provider W i Enter the public key-private key pair (pk i ,sk i ) and vector The algorithm generates the ciphertext vector CT i First, the algorithm selects a random number Then, the algorithm calculates and Finally, the algorithm sets CT i =(ct i,0 ,ct i,1 ), and CT i Sent to cloud server CS1 and cloud server CS2.

[0053] A vector calculation party, which is used to generate a trapdoor for its own vector through a trapdoor generation algorithm based on a private key generated by a key generation center, obtain a first trapdoor and a second trapdoor, send the first trapdoor to the first cloud server, and send the second trapdoor to the second cloud server;

[0054] In the specific implementation, suppose there are n vector computing parties in the system, and the set of all vector computing parties is represented by the symbol Indicates that Each vector calculation party is responsible for generating a trapdoor for its own vector, and sending part of the trapdoor to cloud server CS1 and the other part of the trapdoor to cloud server CS2. j Possess a unique private keyδ j , which runs the trapdoor generation algorithm (Trapdoor) for its own vector q j Generate Trapdoor And some trapdoors Send to cloud server CS1, and the other part of the trapdoor Send to cloud server CS2.

[0055] Specifically, the trapdoor generation algorithm specifically performs the following processing:

[0056] Vector Calculation Method R j Enter the private key δ j and vector The algorithm generates a trapdoor First, the algorithm is based on the private key δ j Calculate v j =δ j ×q j ; Then, the algorithm uses secret sharing technology to calculate the j and v j Get and Specifically, the algorithm first Randomly select two elements as and Then calculate according to the secret sharing technology and Finally, the algorithm sets the trapdoor and and will Send to cloud server CS1, Send to cloud server CS2.

[0057] The first cloud server is configured to obtain a first part of the vector inner product result through decryption processing based on the first trapdoor received from the vector calculation party, in combination with the ciphertext vector from the vector provider and the decryption key, and send the result to the second cloud server;

[0058] In a specific implementation, when the cloud server CS1 receives the vector calculation method R j Provided about the vector q j Partial trapdoor After that, for the ciphertext vector CT i , cloud server CS1 executes the partial decryption algorithm (PDec) to obtain the partial vector inner product result l 1 And sent to the cloud server CS2, that is: vector q j The first trapdoor Same as CT i Calculation; vector q j The first trapdoor Same as CT i Calculation, thereby achieving partial decryption.

[0059] Specifically, the partial decryption algorithm specifically performs the following processing:

[0060] Partial decryption algorithm Given a ciphertext vector CT i , some trapdoors and decryption key dk, cloud server CS z Run the algorithm to calculate the inner product value l of some vectors z ,

[0061]

[0062] Among them, l z represents the inner product result of the zth part of the vector, where z is 1 or 2; d is the vector dimension; ct i,0 [k] is the ciphertext vector ct i,0 The kth position of is the cyclic group An element in ct i,1 [k] is the ct in the ciphertext vector i,1 The kth position of is the cyclic group An element in For the zth trapdoor The kth position of An integer in ; For the zth trapdoor The kth position of is an integer in ; dk[j] is the jth bit of the decryption key, where k is in the range [1, d], j is in the range [1, n], and n is the number of bits of the decryption key.

[0063] The second cloud server is used to obtain the second part of the vector inner product result through decryption processing based on the second trapdoor received from the vector calculation party, in combination with the ciphertext vector and the decryption key from the vector provider; and to obtain the inner product result through decryption processing based on the second part of the vector inner product result, in combination with the first part of the vector inner product result received, and send it to the vector calculation party.

[0064] In a specific implementation, when the cloud server CS2 receives the vector calculation method R j Provided about the vector q j The other part of the trapdoor After that, for the ciphertext vector CT i , cloud server CS2 executes the partial decryption algorithm (PDec) to obtain another part of the vector inner product result l 2 Finally, Cloud Server CS2 is based on l 1 and l 2 Execute the final decryption algorithm (FDec) to obtain the vector p i and vector q j The inner product result of <p i ,q j >, and <p i ,q j >Send to vector calculation party R j .

[0065] Specifically, the final decryption algorithm specifically performs the following processing:

[0066] Final decryption algorithm <p i ,q j >←FDec(l 1 ,l 2 ): given partial vector inner product value l 1 and l 2 , the cloud server CS2 first calculates Then, the cloud server CS2 constructs a mapping table MT to convert the value g c Pointing value c, the value of c is [0, MAX], where MAX is the preset maximum inner product value; Finally, cloud server CS2 locates according to MT And get the final inner product value <p i ,q j >.

[0067] The effectiveness of the solution described in this embodiment is illustrated below by corresponding proofs:

[0068] Based on the decisional Diffie-Hellman (DDH) assumption, this method can resist selective chosen plaintext attacks (s-IND-CPA). At the same time, based on the security of secret sharing, no cloud server can infer the vector ciphertext of the vector calculator from its own trapdoor, thus ensuring the vector privacy of the vector calculator.

[0069] The correctness of the scheme described in this embodiment is defined as follows: Given a public key-private key pair generated by the algorithm Setup(λ, d, W) and the master key θ, by the algorithm Generated private key and decryption key dk, for the algorithm Enc(sk i ,pk i ,p i ) Any ciphertext vector CT generated i And by the algorithm Trapdoor(δ j ,q j ) generated trapdoor Then there is always <p i ,q j >=Dec(l 1 ,l 2 ),in

[0070] The correctness proof is as follows: Given a vector The vector provider runs the Enc algorithm to obtain the ciphertext vector CT i CT i Sent to cloud server and cloud servers CS1 and CS2; given vector The vector calculation method runs the Trapdoor algorithm to obtain the trapdoor and will Send to cloud server CS1, Sent to the cloud server CS2. According to CT i and Cloud server CS1 executes the PDec algorithm to obtain the inner product value l of some vectors 1 , where l 1 The calculation process is shown in formula (1).

[0071]

[0072] Similarly, according to CT i and Cloud server CS2 executes the PDec algorithm to obtain the inner product value l of some vectors 2 , where l 2 The calculation process is shown in formula (2).

[0073]

[0074] Given the inner product value l of the partial vector generated by the PDec algorithm 1 and l 2 , the cloud server CS2 first calculates according to the FDec algorithm The calculation process is shown in formula (3).

[0075]

[0076] Next, since the large prime number p is much larger than the vector inner product result, cloud server CS2 constructs a mapping table MT to convert g c Points to value c. According to MT, cloud server CS2 can Quickly get the final inner product value <p i ,q j >.

[0077] In one or more embodiments, based on the above-mentioned multi-key inner product function encryption system, a multi-key inner product function encryption method is provided, and the method includes the following processing procedures:

[0078] In response to a vector calculation request from a vector calculation party, based on the first trapdoor received from the vector calculation party, in combination with the ciphertext vector from the vector provider and the decryption key, a first part of the vector inner product result is obtained through decryption processing; and based on the second trapdoor received from the vector calculation party, in combination with the ciphertext vector from the vector provider and the decryption key, a second part of the vector inner product result is obtained through decryption processing; wherein the calculation of the first part of the vector inner product result is located on the first cloud server; and the calculation of the second part of the vector inner product result is located on the second cloud server;

[0079] Based on the obtained first part of the vector inner product result and the second part of the vector inner product result, an inner product result is obtained through decryption processing; wherein the calculation of the inner product result is located on the second cloud server.

[0080] Furthermore, for ease of understanding, the solution described in this embodiment is described in detail below with reference to specific examples:

[0081] like Figure 2 As shown in Figure 2, taking the most commonly used multi-hot vector in the field of information retrieval as an example, the steps of the proposed method are shown in detail.

[0082] Step 1: Assume that the vector dimension d = 5 and the vector provider and vector calculation method The key generation center generates corresponding keys for each entity in the system.

[0083] Step 101: The key generation center runs the Setup algorithm to generate system parameters and the system master key θ, generate a public key-private key pair (pk1, sk1) for W1 and a public key-private key pair (pk2, sk2) for W2, where p = 71;

[0084] Step 102: The key generation center runs the KeyGen algorithm to generate a private key δ1 and a corresponding decryption key dk=(dk1) for the vector calculation party R1, and sends dk to the cloud server CS1 and the cloud server CS2.

[0085] Step 2: The vector providers encrypt their respective vectors to form ciphertext vectors, and send the ciphertext vectors to cloud servers CS1 and CS2.

[0086] Step 201: The vector provider W1 executes the Enc algorithm according to its own public key-private key pair (pk1, sk1) to encrypt its own vector p1 = (1, 1, 1, 1, 0) into a ciphertext vector CT1;

[0087] Step 202: The vector provider W2 executes the Enc algorithm according to its own public key-private key pair (pk2, sk2) to encrypt its own vector p2 = (0, 1, 1, 0, 0) into a ciphertext vector CT2;

[0088] Step 203: the vector provider W1 sends CT1 to the cloud server CS1 and the cloud server CS2, and the vector provider W2 sends CT2 to the cloud server CS1 and the cloud server CS2.

[0089] Step 3: The vector calculation party forms a trapdoor for the vector to be calculated, and sends part of the trapdoor to the cloud server CS1 and the other part of the trapdoor to the cloud server CS2.

[0090] Step 301: Vector calculator R1 executes the Trapdoor algorithm based on its private key δ1 to generate a trapdoor for its own vector q1 = (0, 1, 1, 1, 0)

[0091] Step 302: Vector calculation method R1 converts some trapdoors Send to cloud server CS1, and the other part of the trapdoor Send to cloud server CS2.

[0092] Step 4: When receiving the vector calculation request from R1, cloud servers CS1 and CS2 jointly calculate the vector inner product result. The specific process is as follows: Figure 2 shown.

[0093] Step 401: For calculation request Cloud server CS1 executes partial decryption algorithm PDec on ciphertext vector CT1 and stores the result in array L1[1]. Similarly, cloud server CS1 executes partial decryption algorithm PDec on ciphertext vector CT2 and stores the result in array L1[2].

[0094] Step 402: Cloud server CS1 sends array L1 to cloud server CS2;

[0095] Step 403: For the calculation request Cloud server CS2 executes partial decryption algorithm PDec on ciphertext vector CT2 and stores the result in array L2[1]. Similarly, cloud server CS2 executes partial decryption algorithm PDec on ciphertext vector CT2 and stores the result in array L2[2].

[0096] Step 404: Based on L1[1] and L2[1], the cloud server CS2 executes the final decryption algorithm FDec to obtain the inner product result of the vector p1 and the vector q1.<p1,q1> =3; Similarly, according to L1[2] and L2[2], cloud server CS2 executes the final decryption algorithm to obtain the inner product result of vector p2 and vector q1<p2,q1> =2.

[0097] In further embodiments, there is also provided:

[0098] An electronic device includes a memory and a processor and computer instructions stored in the memory and executed on the processor, wherein the computer instructions, when executed by the processor, perform the method described in the above embodiment. For the sake of brevity, no further description is given here.

[0099] It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0100] The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.

[0101] A computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by a processor, the method described in the above embodiment is completed.

[0102] The method in the above embodiment can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.

[0103] Those skilled in the art will appreciate that the units, i.e., algorithm steps, of the various examples described in the present embodiment can be implemented in electronic hardware or in a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.

[0104] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A multi-key inner product function encryption system, characterized in that: include: A key generation center, which is used to generate a key for each vector provider and generate a unique private key for each vector calculator, calculate a decryption key based on the private key, and send the decryption key to the first cloud server and the second cloud server; A vector provider, which is used to encrypt its own vector based on the key generated by the key generation center, obtain the ciphertext vector, and send the ciphertext vector to the first cloud server and the second cloud server; A vector calculation party, which is used to generate a trapdoor for its own vector through a trapdoor generation algorithm based on a private key generated by a key generation center, obtain a first trapdoor and a second trapdoor, send the first trapdoor to the first cloud server, and send the second trapdoor to the second cloud server; The first cloud server is configured to obtain a first part of the vector inner product result through decryption processing based on the first trapdoor received from the vector calculation party, in combination with the ciphertext vector from the vector provider and the decryption key, and send the result to the second cloud server; The second cloud server is used to obtain the second part of the vector inner product result through decryption processing based on the second trapdoor received from the vector calculation party, in combination with the ciphertext vector and the decryption key from the vector provider; and to obtain the inner product result through decryption processing based on the second part of the vector inner product result, in combination with the first part of the vector inner product result received, and send it to the vector calculation party.

2. A multi-key inner product function encryption system as claimed in claim 1, characterized in that: The calculation of the inner product result of the first part of the vectors and the inner product result of the second part of the vectors is specifically performed using the following formula: Among them, l z represents the inner product result of the zth part of the vector, where z is 1 or 2; d is the vector dimension; ct i,0 [k] is the ciphertext vector ct i,0 The kth position of is the cyclic group An element in ct i,1 [k] is the ciphertext vector ct i,1 The kth position of is the cyclic group An element in For the zth trapdoor The kth position of An integer in ; For the zth trapdoor The kth position of is an integer in ; dk[j] is the jth bit of the decryption key, where k is in the range [1, d], j is in the range [1, n], and n is the number of bits of the decryption key.

3. A multi-key inner product function encryption system as claimed in claim 1, characterized in that: The inner product result based on the second part of the vector is obtained through decryption processing in combination with the received inner product result of the first part of the vector. Specifically, the second cloud server constructs a mapping table, locates the product of the inner product result of the first part of the vector and the inner product result of the second part of the vector based on the mapping table, and obtains the final inner product value.

4. A multi-key inner product function encryption system as claimed in claim 1, characterized in that: The decryption key is calculated based on the private key, specifically: an integer is randomly selected from a pre-constructed positive integer group as the private key of the vector calculation party, and the decryption key is calculated based on the private key and the master key of the key generation center.

5. A multi-key inner product function encryption system as claimed in claim 1, characterized in that: The system needs to meet the following constraints: the key generation center, the vector provider and the vector calculation party are all trustworthy, the first cloud server and the second cloud server are semi-trustworthy, and there is no collusion between the first cloud server and the second cloud server.

6. A multi-key inner product function encryption method, characterized in that: It is based on a multi-key inner product function encryption system as described in any one of claims 1 to 6, and the method comprises: In response to a vector calculation request from a vector calculation party, based on the first trapdoor received from the vector calculation party, in combination with the ciphertext vector from the vector provider and the decryption key, a first part of the vector inner product result is obtained through decryption processing; and based on the second trapdoor received from the vector calculation party, in combination with the ciphertext vector from the vector provider and the decryption key, a second part of the vector inner product result is obtained through decryption processing; wherein the calculation of the first part of the vector inner product result is located on the first cloud server; and the calculation of the second part of the vector inner product result is located on the second cloud server; Based on the obtained first part of the vector inner product result and the second part of the vector inner product result, an inner product result is obtained through decryption processing; wherein the calculation of the inner product result is located on the second cloud server.

7. An electronic device comprising a memory, a processor and a computer program stored and running on the memory, characterized in that: When the processor executes the program, the multi-key inner product function encryption method as described in any one of claims 1 to 5 is implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a multi-key inner product function encryption method as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Device and method for executing vector inner product operation

    CN107315718A

  • Ciphertext multi-keyword grading security retrieval method

    CN107704768A

  • Inner product function encryption method and system with privacy protection and without central mechanism

    CN114139187A

  • Decentralized multi-authority attribute-based inner-product functional encryption

    EP4254858A1

  • Cipher system by public key encryption method using a plurality of knapsacks, key generating device, encrypting device, decrypting device, data exchange method, and program

    JP2011128281A