A multi-key inner product function encryption method and system

By using a multi-key inner product encryption system, a unique key is generated for each user and decryption processing is distributed on a cloud server, solving the privacy and efficiency problems in multi-user vector inner product calculation and achieving efficient and secure vector inner product calculation.

CN119945671BActive Publication Date: 2025-11-04HUNAN UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing vector inner product encryption methods are insufficient to securely and efficiently support vector inner product calculation scenarios involving multiple users, especially in terms of protecting the vector privacy of the vector computer.

Method used

A multi-key inner product encryption system is adopted, which generates unique keys and private keys for each vector provider and computer through a key generation center. The secret sharing technology ensures the vector privacy of the vector computer, and the decryption process is distributed on two semi-trusted cloud servers to avoid the complexity of homomorphic computation and bilinear pairing computation.

Benefits of technology

It enables fast and accurate computation of vector inner products while protecting the privacy of both the vector provider and the computer, reducing computational complexity and communication costs, and improving operational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119945671B_ABST
    Figure CN119945671B_ABST
Patent Text Reader

Abstract

The application provides a multi-key inner product function encryption method and system. The scheme ensures that each user has different keys by embedding different eliminable random factors in the keys, and ensures the vector privacy of the vector calculation party by using secret sharing. Meanwhile, the scheme does not need to run complex homomorphic calculation and bilinear pair calculation, and has high overall running efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of encryption technology, and particularly relates to a multi-key inner product function encryption method and system. BACKGROUND

[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 similarity between two objects (such as text, image, etc.) is measured by encoding the source data and the data to be retrieved into vectors and then using vector inner product. In addition, with the widespread development of Internet of Things, mobile Internet and other technologies, the scale of data is increasing. In order to complete machine learning, information retrieval and other services, it is urgent to have a large-capacity, high-performance data processing platform to complete vector inner product calculation.

[0003] Cloud computing, as a flexible and efficient computing mode, provides good technical support for large-scale vector inner product calculation. However, with the convergence of massive data in the cloud, data security problems are becoming increasingly serious. In order to ensure the privacy of vector data and the feasibility of vector inner product, researchers have proposed differential privacy, homomorphic encryption, secure multi-party computation, inner product function encryption and other technologies. Among these technologies, the random noise introduced by differential privacy reduces the calculation accuracy, the secure multi-party computation technology faces expensive communication costs, and the calculation complexity of homomorphic encryption is very high. In contrast, inner product function encryption has lower communication and calculation costs.

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

[0005] The inventors find that the vector inner product functional encryption mainly adopts the following strategy: a vector provider sends his own vector p to a cloud server after encrypting it, a vector calculator sends his own vector q to the cloud server after forming a trapdoor, 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 securely and efficiently support the vector inner product calculation scene of multiple users. For example, the vector inner product functional encryption proposed in the document "Simple Functional Encryption Schemes for Inner Products" can guarantee the efficiency of vector inner product calculation, but it needs all users to use the same key to encrypt the vector in the multi-user vector inner product calculation scene, and at the same time, the method needs to complete the vector inner product calculation on the premise of knowing the vector q plaintext, and cannot protect the vector privacy of the vector calculator. SUMMARY

[0006] Embodiments of the present application provide a multi-key inner product functional encryption method and system to solve the problem that the existing scheme is difficult to securely and efficiently support the vector inner product calculation scene of multiple users.

[0007] According to a first aspect of embodiments of the present application, a multi-key inner product functional encryption system is provided, comprising:

[0008] A key generation center for generating a key for each vector provider, and generating a unique private key for each vector calculator, calculating a decryption key based on the private key, and sending the decryption key to a first cloud server and a second cloud server;

[0009] A vector provider for encrypting its own vector based on the key generated by the key generation center, obtaining a ciphertext vector, and sending the ciphertext vector to the first cloud server and the second cloud server;

[0010] A vector calculator for generating a trapdoor for its own vector through a trapdoor generation algorithm based on the private key generated by the key generation center, obtaining a first trapdoor and a second trapdoor, sending the first trapdoor to the first cloud server, and sending the second trapdoor to the second cloud server;

[0011] A first cloud server for obtaining a first part of the vector inner product result through decryption processing based on the received first trapdoor from the vector calculator, combining the ciphertext vector from the vector provider and the decryption key, and sending the first part of the vector inner product result to a second cloud server;

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

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

[0014]

[0015] Among them, l z This represents the result of the inner product of the z-th vector, where z takes the value 1 or 2; d is the vector dimension; ct i,0 [k] represents ct in the ciphertext vector. i,0 The k-th position is the cyclic group. One of the elements; ct i,1 [k] represents ct in the ciphertext vector. i,1 The k-th position is the cyclic group. One of the elements; For the zth trap The k-th position is the group One of the integers; For the zth trap The k-th position is the group dk[j] is an integer in the decryption key; dk[j] is the j-th bit of the decryption key, where k takes the value [1, d], j takes the value [1, n], and n is the number of bits in the decryption key.

[0016] Furthermore, the process of obtaining the inner product result based on the second part of the vector inner product result, combined with the received first part of the vector inner product result, through decryption processing, specifically involves: the second cloud server constructing a mapping table, locating the product of the first part of the vector inner product result and the second part of the vector inner product result based on the mapping table, and obtaining the final inner product value.

[0017] Furthermore, the decryption key is calculated based on the private key, specifically by randomly selecting an integer from a pre-constructed group of positive integers as the private key of the vector calculation party, and calculating the decryption key based on the private key and the master key of the key generation center.

[0018] Furthermore, the system must satisfy the following constraints: the key generation center, the vector provider, and the vector computation provider are trustworthy; the first cloud server and the second cloud server are semi-trustworthy; and the first cloud server and the second cloud server do not collude.

[0019] According to a second aspect of the embodiments of the present application, a multi-key inner product functional encryption method is provided, which is based on the multi-key inner product functional encryption system described above, and the method comprises:

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

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

[0022] According to a third aspect of the embodiments of the present application, an electronic device is provided, which comprises a memory, a processor and a computer program stored in the memory and running on the memory, and the processor implements the multi-key inner product functional encryption method when executing the program.

[0023] According to a fourth aspect of the embodiments of the present application, a non-transitory computer readable storage medium is provided, which stores a computer program, and the program is executed by a processor to implement the multi-key inner product functional encryption method.

[0024] The above one or more technical solutions have the following beneficial effects:

[0025] The present application provides a multi-key inner product functional encryption method and system, which ensures that each user has a different key by embedding different eliminable random factors in the key, and ensures the vector privacy of the vector calculation party by using secret sharing.

[0026] The scheme of the present application can quickly and accurately calculate the vector inner product under the premise of protecting the vector privacy of the vector provider and the vector calculation party.

[0027] The scheme of the present application does not need to run complex homomorphic calculation and bilinear pair calculation, and has high overall running efficiency.

[0028] The advantages of the additional aspects of the present application will be partially given in the following description, partially will become obvious from the following description, or will be understood through the practice of the present application. BRIEF DESCRIPTION OF DRAWINGS

[0029] The accompanying drawings, which form a part of this specification, are included to provide a further understanding of the application and are incorporated herein for explanation.

[0030] Figure 1 A multi-key inner product function encryption system structure diagram according to an embodiment of the present application;

[0031] Figure 2 A multi-key inner product function encryption method flow chart according to an embodiment of the present application. DETAILED DESCRIPTION

[0032] It should be noted that the following detailed description is merely exemplary in nature and is intended to provide further description of the application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.

[0033] It should be noted that the terms used herein are merely for the purpose of describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application.

[0034] In the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.

[0035] Term explanation:

[0036] Non-conspiracy: indicates that the cloud servers will not cooperate with each other to leak user data or perform other behaviors that harm the interests of users under normal circumstances.

[0037] Parameter meaning explanation:

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

[0039] Table 1 Parameter meaning explanation

[0040]

[0041] The embodiments of the present application provide a multi-key inner product function encryption system. The main technical concept is as follows:

[0042] During key generation, different reversible random factors are embedded to ensure that each vector provider and vector computer possesses a different key. Secondly, the method utilizes secret sharing technology to ensure vector privacy for the vector computer. The entire method does not require complex homomorphic or bilinear pairing calculations, resulting in high overall efficiency. It securely implements the vector inner product function while guaranteeing that each vector provider and computer possesses a different key. The method involves interaction between four entities: a key generation center, vector providers, vector computers, and two non-colluding cloud servers. The key generation center is trusted; the vector providers and computers are honest (they will not intentionally disclose their keys to other entities); and the cloud servers are semi-trusted (they honestly execute predefined protocols and algorithms but infer the plaintext value of the vector based on the execution process).

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

[0044] A key generation center is used to generate a key for each vector provider and a unique private key for each vector computer, 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 practice, the key generation center pre-runs an initialization algorithm (Setup) to generate the system's master key θ, and simultaneously 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), compute the method for each vector. Generate a unique private key δ j And calculate the decryption key dk = (dk1, ..., dk n Then it is sent to the first cloud server CS1 and the second cloud server CS2.

[0046] Specifically, firstly, the key generation center inputs a security parameter λ to generate a cyclic group of order p and generator g. and from the group A random integer θ is chosen as the master key, where p is a large prime number, much larger than the vector dot product value. Let p be the group of positive integers modulo p; then, for each vector, provide the method Key generation center from Randomly generate a set of d-dimensional vectors Finally, the key generation center is W. i Generate public-private key pairs (pk i ,ski ), wherein the public key The private key sk i = s i × θ.

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

[0048] For each vector calculation party The key generation center randomly selects an integer δ from j as the private key of R j , and calculates dk j = (s j × δ -1 ) mod p-1. When the key generation of all vector calculation parties is completed, the final formed decryption key dk = (dk1, …, dk n ) will be sent to the cloud server CS1 and the cloud server CS2.

[0049] The vector provider 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 a specific implementation, it is assumed that there are m vector providers in the system, and the set of all vector providers is denoted by the symbol , wherein Each vector provider is responsible for encrypting its own vector to form a ciphertext vector, and sending the ciphertext vector to the cloud server. Specifically, the vector provider W i has a public-private key pair (pk i , sk i ), which runs the vector encryption algorithm (Enc) to encrypt its own vector p i to ciphertext vector CT i , and sends the ciphertext vector CT i to the cloud server CS1 and the cloud server CS2 at the same time.

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

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

[0053] The vector computation method is used to generate trapdoors for its own vector based on the private key generated by the key generation center, and obtain the first trapdoor and the second trapdoor. The first trapdoor is sent to the first cloud server and the second trapdoor is sent to the second cloud server.

[0054] In practical implementation, assume there are n vector computation methods in the system, and the set of all vector computation methods is denoted by the symbol […]. It means that among them Each vector computation party is responsible for generating trapdoors for its own vectors, sending a portion of the trapdoor to cloud server CS1 and the other portion to cloud server CS2. Specifically, vector computation party R... j Possess a unique private key δ j Its trapdoor generation algorithm generates its own vector q. j Generate a trapdoor And some of the trapdoors Send to cloud server CS1, and send another part of the trapdoor. Send to cloud server CS2.

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

[0056] Vector computation method R j Enter private key δ j sum vector The algorithm generates trapdoors. First, the algorithm is based on the private key δ j Calculate v j =δ j ×q j Then, the algorithm utilizes a secret-sharing technique, based on q j and v j They were obtained respectively and Specifically, the algorithm first starts from Two elements are randomly selected from the data as... and Then, calculations are performed based on the secret sharing technology. and Finally, the algorithm sets up a trapdoor. and And Send to cloud server CS1, Send to cloud server CS2.

[0057] The first cloud server is used to obtain the first part of the vector inner product result by decryption processing based on the first trapdoor received from the vector computing party, combined with the ciphertext vector from the vector provider and the decryption key, and then send it to the second cloud server.

[0058] In practical implementation, when cloud server CS1 receives a vector computation method R... j Provided about vector q j Partial trapdoor Then, for the ciphertext vector CT i The cloud server CS1 executes the partial decryption algorithm (PDec) to obtain the partial vector inner product result. 1 And send it to the cloud server CS2, that is: vector q j The first trap Same as CT i Calculate; vector q j The first trap Same as CT i The calculations are then performed to partially decrypt the code.

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

[0060] Partial decryption algorithm Given the ciphertext vector CT i Partial trapdoor and decryption key dk, cloud server CS z Running this algorithm calculates the partial vector inner product value l. z ,

[0061]

[0062] Among them, l z This represents the result of the inner product of the z-th vector, where z takes the value 1 or 2; d is the vector dimension; ct i,0 [k] represents ct in the ciphertext vector. i,0 The k-th position is the cyclic group. One of the elements; ct i,1 [k] represents ct in the ciphertext vector. i,1 The k-th position is the cyclic group. One of the elements; For the zth trap The k-th position is the group One of the integers; For the zth trap The k-th position is the group dk[j] is an integer in the decryption key; dk[j] is the j-th bit of the decryption key, where k takes the value [1, d], j takes the value [1, n], and n is the number of bits in the decryption key.

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

[0064] In practical implementation, when the cloud server CS2 receives a vector computation method R... j Provided about vector q j Another part of the trapdoor Then, for the ciphertext vector CT i The cloud server CS2 executes a partial decryption algorithm (PDec) to obtain another part of the vector inner product result. 2 Finally, the cloud server CS2 is based on l 1 and l 2 Executing the final decryption algorithm (FDec) yields information about vector p. i sum vector q j inner product result <p i ,q j > and will <p i ,q j >Sent to vector computation R j .

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

[0066] Final decryption algorithm <p i ,q j >←FDec(l 1 ,l 2 ): Given the inner product value of a partial vector l 1 and l 2 The cloud server CS2 first calculates Then, the cloud server CS2 constructs a mapping table MT to store the value g. c The pointer points to a value c, which takes the value [0, MAX], where MAX is the preset maximum inner product value; finally, the cloud server CS2 locates the target location based on MT. And obtain the final inner product value. <p i ,q j >

[0067] The effectiveness of the solution described in this embodiment will be demonstrated through corresponding evidence below:

[0068] Based on the Decisional Diffie-Hellman (DDH) assumption, the method can resist selective against chosen plaintext attacks (s-IND-CPA). At the same time, based on the security of secret sharing, any cloud server cannot infer the vector ciphertext of the vector calculation party from the respective trapdoor, thereby ensuring the vector privacy of the vector calculation party.

[0069] The correctness of the scheme described in the embodiment is defined as follows: given the public-private key pair and the master key θ generated by the algorithm , the private key and the decryption key dk, for any ciphertext vector CT i ,pk i ,p i ) generated by the algorithm Enc(sk i and the trapdoor j ,q j generated by the algorithm Trapdoor(δ then there is always i ,q j = Dec(l 1 ,l 2 ), where

[0070] The correctness is proved as follows: given the vector The vector provider runs the Enc algorithm to obtain the ciphertext vector CT i , and sends CT i to the cloud servers and the cloud servers CS1 and CS2; given the vector The vector calculation party runs the Trapdoor algorithm to obtain the trapdoor and sends to the cloud server CS1, and sends to the cloud server CS2. According to CT i and The cloud server CS1 performs the PDec algorithm to obtain the partial vector inner product value l 1 , where the calculation process of l 1 is shown in formula (1).

[0071]

[0072] Similarly, according to CT i and The cloud server CS2 performs the PDec algorithm to obtain the partial vector inner product value l 2 , wherein l 2 is calculated according to formula (2).

[0073]

[0074] Given the partial vector inner product value l 1 generated by the PDec algorithm, and l 2 , the cloud server CS2 first calculates according to the FDec algorithm, wherein 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, the cloud server CS2 constructs a mapping table MT to point the value c to g c . According to the MT, the cloud server CS2 can quickly obtain the final inner product value <p i , q j > according to .

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

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

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

[0080] Further, in order to facilitate understanding, the scheme described in the embodiment is described in detail below in combination with specific examples:

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

[0082] Step 1: Assuming that the vector dimension d=5, the vector provider​ and vector computation party The key generation center generates corresponding keys for each entity of the system.

[0083] Step 101: The key generation center runs the Setup algorithm to generate system parameters and the system master key θ, generates a public-private key pair (pk1, sk1) for W1, and generates a public-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 computation party R1, and sends dk to the cloud server CS1 and the cloud server CS2.

[0085] Step 2: The vector provider encrypts the respective vector to form a ciphertext vector, and sends the ciphertext vector to the cloud server CS1 and the cloud server CS2.

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

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

[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 computation party forms a trapdoor for the vector to be computed, 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: The vector computation party R1 generates a trapdoor

[0091] Step 302: The vector computation party R1 sends part of the trapdoor to the cloud server CS1, and sends the other part of the trapdoor to the cloud server CS2.

[0092] Step 4: When receiving the vector computation request from R1, the cloud server CS1 and the cloud server CS2 jointly compute the vector inner product result, and the specific process is as followsFigure 2 as shown.

[0093] Step 401: for the computation request The cloud server CS1 performs the partial decryption algorithm PDec on the ciphertext vector CT1 and stores the result in the array L1[1]; similarly, the cloud server CS1 performs the partial decryption algorithm PDec on the ciphertext vector CT2 and stores the result in the array L1[2];

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

[0095] Step 403: for the computation request The cloud server CS2 performs the partial decryption algorithm PDec on the ciphertext vector CT2 and stores the result in the array L2[1]; similarly, the cloud server CS2 performs the partial decryption algorithm PDec on the ciphertext vector CT2 and stores the result in the array L2[2];

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

[0097] In more embodiments, there are also provided:

[0098] An electronic device comprising a memory and a processor and computer instructions stored on the memory and running on the processor, when the computer instructions are run by the processor, the method described in the above embodiments is completed. For the sake of brevity, it will not be repeated here.

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

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

[0101] A computer readable storage medium for storing computer instructions, when the computer instructions are executed by the processor, the method described in the above embodiments is completed.

[0102] The method in the above embodiments can be directly embodied as being completed by a hardware processor, or being completed by a combination of hardware and software modules in the processor. The software modules can be located in storage media in the art such as random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), electrically programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), register, or the like. The storage media is located in the storage, and the processor reads information in the storage and combines hardware to complete the steps of the above method. To avoid repetition, no longer detailed description is made here.

[0103] Those skilled in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software mode depends on the specific application and design constraints of the technical solutions. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present disclosure.

[0104] The above only describes the preferred embodiments of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure can have various modifications and changes. 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 by comprising: The system comprises: a key generation center for providing key generation for each vector provider, generating a unique private key for each vector calculator, calculating a decryption key based on the private key, and sending the decryption key to the first cloud server and the second cloud server; a vector provider for encrypting its own vector based on the key generated by the key generation center, obtaining a ciphertext vector, and sending the ciphertext vector to the first cloud server and the second cloud server; a vector calculator for generating a trapdoor for its own vector through a trapdoor generation algorithm based on the private key generated by the key generation center, obtaining a first trapdoor and a second trapdoor, sending the first trapdoor to the first cloud server, and sending the second trapdoor to the second cloud server; a first cloud server for obtaining a first partial vector inner product result through decryption processing based on the received first trapdoor from the vector calculator, combining the ciphertext vector from the vector provider and the decryption key, and sending the first partial vector inner product result to the second cloud server; a second cloud server for obtaining a second partial vector inner product result through decryption processing based on the received second trapdoor from the vector calculator, combining the ciphertext vector from the vector provider and the decryption key, and obtaining an inner product result through decryption processing based on the second partial vector inner product result and the received first partial vector inner product result, and sending the inner product result to the vector calculator.

2. A multiple-key inner product function encryption system as claimed in claim 1, characterized in that, The calculation of the first partial vector inner product result and the second partial vector inner product result specifically uses the following formula: ; in, This represents the result of the inner product of the z-th vector, where z takes the value 1 or 2; d is the vector dimension. In the ciphertext vector The The position is the cyclic group. One of the elements; In the ciphertext vector The The position is the cyclic group. One of the elements; For the zth trap The Position, that is, group One of the integers; For the zth trap The Position, that is, group One of the integers; For the decryption key Position, among which The value is , The value is , where n is the number of bits in the decryption key.

3. A multiple-key inner product function encryption system as claimed in claim 1, characterized in that, The obtaining of the inner product result through decryption processing based on the second partial vector inner product result and the received first partial vector inner product result specifically comprises: the second cloud server constructs a mapping table, locates to the product of the first partial vector inner product result and the second partial vector inner product result based on the mapping table, and obtains the final inner product value.

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

5. A multiple-key inner-product function encryption system as claimed in claim 1, characterized in that, The system needs to satisfy the following constraints: the key generation center, the vector provider, and the vector calculator are all trusted, the first cloud server and the second cloud server are semi-trusted, and the first cloud server and the second cloud server do not collude.

6. A multi-key inner product function encryption method characterized by, The method is based on the multi-key inner product function encryption system of any one of claims 1-5, and the method comprises: in response to a vector calculation request from the vector calculator, obtaining a first partial vector inner product result through decryption processing based on the received first trapdoor from the vector calculator, combining the ciphertext vector from the vector provider and the decryption key, and obtaining a second partial vector inner product result through decryption processing based on the received second trapdoor from the vector calculator, combining the ciphertext vector from the vector provider and the decryption key; wherein the calculation of the first partial vector inner product result is located in the first cloud server, and the calculation of the second partial vector inner product result is located in the second cloud server. Based on the obtained first partial vector inner product result and the second partial vector inner product result, an inner product result is obtained through a decryption process; wherein, the calculation of the inner product result is located in the second cloud server.

7. An electronic device comprising a memory, a processor, and a computer program stored on the memory to run on the processor, characterized in that, The processor implements the multi-key inner product functional encryption method of any one of claims 1-5 when executing the program.

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

Citation Information

Patent Citations

  • Ciphertext multi-keyword grading security retrieval method

    CN107704768A

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

    CN114139187A