Abstract
The problem of privacy preserving inner product of vectors has been widely studied. Much work has been done on the scenario of two parties involved in the computation. In this paper, we consider the scenario where three parties are involved in the computing process of cloud computing. We propose a new privacy preserving scheme for inner product of two vectors in the cloud and give the correctness analysis and performance analysis for the scheme. The proposed scheme is based on homomorphic encryption, and the security can be guaranteed. Experiments show the efficiency of the scheme.
1. Introduction
The computation of inner product of vectors is a fundamental mathematical operation. The inner product of vectors has found wide application in the research field of computer science, such as cooperative statistical analysis [1], data mining [2], and similarity computation [3]. The model depicted in Figure 1 is adopted in much work, where two parties, that is, the server and the client, are involved. The server owns a large amount of data, and the client may issue query to the server. In Model 1, the problem of data privacy preservation is one of the most important security issues. The problem of privacy preserving inner product of vectors has gained thorough research, and much work has been done on it, such as [1–7].

Model 1.
When the server possesses particularly large amounts of data or the amount of query from the clients is considerably abundant, the server may be overburdened. Now, the cloud computing has gained wide research and many applications have been deployed in the cloud. Three parties are generally involved in the cloud computing model [8]. The existing work on privacy preserving inner product of vectors between two parties cannot work well any longer.
A secure privacy preserving scheme was presented for inner product of vectors in cloud computing in [9]. The scheme is effective and achieves the goal of data privacy preservation. However, it is the array that acts as the shared secret key between the data owner and the client. The array may be large when the vector has big size of dimensionality. It is inconvenient for the data owner to update the secret key when there are many clients.
We propose a new scheme on the basis of homomorphic encryption, which aims at the problem of privacy preserving inner product of vectors in cloud computing. Our proposed scheme can work seamlessly with the other secure scheme of inner product of vectors, such as correctness verification of inner product of vectors [10].
The rest of this paper is organized as follows. Section 2 describes the background knowledge, including the inner product of vectors, homomorphic encryption, and the system model and threat model. Section 3 summarizes the existing works on privacy preserving inner product of vectors. Section 4 introduces our proposed scheme for privacy preserving inner product of vectors in the cloud. Following that, experimental results are given in Section 5. Finally, Section 6 concludes the paper.
2. Background
2.1. Inner Product of Vectors
Let
2.2. Homomorphic Encryption
Let
For convenience, we introduce a symbol
The Paillier's homomorphic encryption is adopted in the following [11].
2.3. System and Threat Models
A simplified architecture of cloud computing is given in Figure 2. Three parties are involved in Model 2, that is, the data owner, the service provider, and the client. The data owner holds large quantities of data. The data owner outsources the heavy data management task to the service provider to reduce the total cost. The service provider is a specific cloud service provider, which possesses rich resources, including hardware, software, and network. The service provider provides the users with the services of storage, computation, and so forth. The authorized client may issue a request to the service provider. Here, the user may be a company, an organization, or an individual, who makes use of the cloud service. The data owner and the client are both users. The client is a specific user, which refers to the party that can only issue query to the service provider.

Model 2.
In the above model, the data owner, who is the owner of the data stored on the service provider side, is honest. The service provider and the client are both semihonest. The service provider attempts to obtain the original data of the data owner and the client. The client attempts to get the original data of the data owner. Suppose that the data are transferred between the three parties through secure channel.
3. Related Works
A privacy preserving scheme of inner product of vectors was proposed for privacy preserving data mining between two parties in [2], in which the matrix multiplication operation was adopted. The privacy of the input data and the obtained result was preserved simultaneously. A state-of-the-art overview of the privacy preserving inner product of vectors problem and the properties of some solutions were given in [4], where the scheme proposed in [2] was analyzed and proved to be not secure, and a new scheme was presented based on the homomorphic encryption, which has strong security guarantee.
For the purpose of detecting similar documents as well as preserving data privacy between two parties, two privacy preserving schemes for inner product of vectors, that is, the random array scheme and the homomorphic encryption scheme, were utilized in [3]. Privacy preserving inner product of vectors was applied to determine the relative position of two spatial geometric objects in [12].
An efficient and secure inner product protocol in the presence of malicious adversaries was presented in [6]. The protocol was based on the proof of knowledge of a discrete logarithm and the verifiable encryption.
Secure two-party inner product of vectors was extended to the quantum field in [7]. The given protocol was built upon quantum entanglement and quantum measurement.
The problem of correctness verification of inner product of vectors was studied in the cloud computing scenario in [9], in which the array multiplication operation was adopted to preserve the data privacy.
4. The Proposed Scheme
Suppose the data owner holds a vector
4.1. Overview
In our scheme, three parties are involved in the computation. Data privacy of each party needs to be preserved. The privacy preserving scheme for inner product of vectors in the cloud scenario works as follows.
KeyGen. First of all, the data owner and the client generate the necessary keys, respectively, and share the keys with the related party. Encrypt. The data owner encrypts the original vector to obtain the ciphertext and sends it to the service provider. The service provider receives the data from the data owner and monitors the query request from the client. Request. The client encrypts the original request vector to get the transformed vector and sends it to the service provider. Compute. The service provider performs computing on the ciphertext from the data owner and the client and obtains the intermediate results and sends them back to the client. GetResult. The client computes the returned results to get the final result.
4.2. Details
In this section, we describe the design details of each algorithm.
(
1) KeyGen. Whatever encryption scheme or data processing algorithm is chosen, the key(s) is (are) necessary. The keys are generated on the data owner side and client side, respectively, which are given as follows.
The data owner randomly generates a key pair The client randomly generates an
(
2) Encrypt. Aiming at privacy preservation of the data, the data owner encrypts each element
(
3) Request. Before issuing the request to the service provider, it is necessary for the client to transform the request data to preserve privacy. The data transformation on the client side works as follows.
The client randomly generates a vector r with dimensionality of compute z, where
Let z be denoted as
It is vector z that is sent to the service provider, which cannot reveal the value of u. Though the service provider holds A and z, it cannot detect u and r via solving the system of linear equations. Thus, the data privacy of the client is preserved through mathematical transformation.
(
4) Compute. Upon receiving the request z from the client, the service provider starts to compute S and y. S is an intermediate result and contains the final result, where
y is a vector with dimensionality of
Then, the service provider responds to the client with S and y.
(
5) GetResult. Based on the returned results S and y from the service provider, the client first computes
Thus, the final result is obtained; that is,
4.3. Correctness Analysis
In this section, we illustrate the correctness of our proposed scheme.
In the algorithm Compute, the service provider obtains S as the intermediate result. By (1) and (6), we have
Along with S, the service provider obtains a vector
In the algorithm GetResult, the client computes and gets
Thus, in the algorithm GetResult, when the client computes
In the end, the client obtains the deserved result
4.4. Performance Analysis
In this section, we give the performance analysis of each algorithm.
In the algorithm Encrypt, each vector element In the algorithm Request, the original user request vector u is transformed into z on the client side, where matrix multiplication is used. The time complexity of algorithm Request is In the algorithm Compute, S and y are obtained on the service provider side, where In the algorithm GetResult,
It is worth mentioning especially that magnitude of the time complexity of algorithm Request and that of Compute are different. Homomorphic encryption is performed on exponents in the algorithm Encrypt, and multiplication and addition are performed on integers in the algorithm Request. The actual time cost is quite different, though the time complexity of both Request and Compute is
4.5. Security Analysis
In this subsection, we give the security analysis, which is presented from three aspects, that is, data privacy preservation of the data owner, the client, and the result.
Data Privacy of the Data Owner. Because the data on the data owner side are encrypted by homomorphic encryption scheme, the service provider can detect nothing about the original data. Then, the data privacy of the data owner is preserved with security guarantee.
Data Privacy of the Client. The query issued by the client is transformed via matrix operation, and the service provider gets
In (16), there are n equations and
Data Privacy of the Result. In our proposed scheme, the result of inner product of vectors is not given directly. The result is given by the intermediates S and y, which are both encrypted by homomorphic encryption scheme. The security of S and y can be guaranteed by the homomorphic encryption scheme. Thus, the data privacy of the result is preserved.
5. Experiments
We now evaluate the performance overhead of our proposed scheme for privacy preserving inner product of vectors in cloud computing. We use a Pentium Dual E2200 2.20 GHz PC with 1.99 GB RAM. Code is developed in C using the MIRACL library. Synthetic 5-dimensional data are used, which are integers generated randomly within

Experiment results.
As can be seen in Figure 3, the performance overhead of each algorithm is consistent with the performance analysis in Section 4.4. Homomorphic encryption is utilized in the algorithms of Encrypt, Compute, and GetResult, where the operation is performed on exponents. The actual time cost of the algorithm Compute is the highest, and that of the algorithm Encrypt is the second among the four algorithms, which is shown in Figure 3(a).
In Section 4.4, we have mentioned that the actual time cost of algorithm Request and Compute is quite different, though the time complexity of the two algorithms is
The actual time cost of the algorithms Request and GetResult is so small compared with the algorithms Encrypt and Compute that they cannot be distinguished from each other clearly. The performance of the algorithms Request and GetResult is shown again in Figure 3(b), where it demonstrates that the time cost of the algorithm Request is higher.
6. Conclusion
Aiming at the problem of privacy preservation of inner product of vectors in cloud computing, a new scheme is presented with the homomorphic encryption as the fundamentals. The scheme is applicable for the cloud scenario where three parties are involved in the computation.
In future work, we plan to consider the case where the service provider of the cloud is malicious. Another interesting direction is access control of the client when there are multiple clients with different access permissions.
Footnotes
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
Acknowledgments
This work was supported in part by the National Natural Science Foundation of China under Grants 61170169, 61170168, 11271226, and 61100028, by the Foundation of Dalian Scientific and Technical Planning Project under Grant 2013A16GX115, by the Science Foundation of Liaoning Education Ministry under Grant L2013517, and by the Natural Science Foundation of Shandong Province under Grants ZR2012AL07 and ZR2013AM013.
