# LPCP: An efficient Privacy-Preserving Protocol for Polynomial Calculation Based on CRT
## 8 Performance and Evaluation
### Practical Performance  
Firstly, we run the LPCP code on a Raspberry Pi to show the compatibility of our scheme with the ARM architecture. The concrete configuration of our ARM environment is shown in Table 1.  
Secondly, we run the LPCP code on the Intel X86 architecture computer in order to compare the experimental results with other secure computation protocol implementations, which are only supported in the X86 instruction set. The concrete configuration of our X86 environment is shown in Table 2.  
All the experiments are run on the two virtual machines on the same localhost, where the bandwidth bound is 100 Mbps and the latency can be ignored. Given the input \(m_{i}\), the addition operation expression is \(\sum_{i=1}^{n}m_{i}\) and the multiplication operation expression is \(\prod_{i=1}^{n}m_{i}\). Figure 2 shows the LPCP running time comparison of different arithmetic operation types both on ARM architecture and X86 architecture. When the security parameter length is 32 bits, 64 bits and 128 bits, the running time of LPCP on the ARM architecture is approximately 10 times slower than the running time of LPCP on the X86 architecture. When the security parameter length grows to 256 bits and 1024 bits, the running time of LPCP on the ARM architecture is approximately four times slower than the running time of LPCP on the X86 architecture. It turns out that LPCP protocol can be effectively implemented on the mobile devices based on ARM architecture. \begin{table}
\begin{tabular}{c c} \hline CPU & Quad core Cortex-A72 (ARM v8) 64-bit @ 1.5 \\ GHz \\ \hline RAM & 1 GB LPDDR4 \\ \hline OS & Ubuntu 20.04 \\ \hline Programming language & c++11 \\ \hline Compiler & gcc version 9.3.0 \\ \hline Libraries & openssl-3.0.1, gmp-6.2.1 \\ \hline \end{tabular}
\end{table} 
Table 1: Configurations of experiment on ARM architecture. \begin{table}
\begin{tabular}{c c} \hline CPU & i5-8259U \\ \hline RAM & 8 GB DDR4 \\ \hline OS & Ubuntu 20.04.3 LTS \\ \hline Programming language & c++11 \\ \hline Compiler & gcc version 9.3.0 \\ \hline Libraries & openssl-3.0.1, gmp-6.2.1 \\ \hline \end{tabular}
\end{table} 
Table 2: Configurations of experiment on X86 architecture. Table 3 shows the practical performance of the two-party LPCP protocol on additive and multiplicative arithmetic operations in both the ARM architecture and the X86 architecture environment. In Table 3, the first column is the arithmetic operation type; the second column is the running time of LPCP execution in ARM architecture environment; the third column is the running time of LPCP execution in X86 architecture environment; and the last column is the communication overhead of ciphertexts transferred between two parties. For comparison with other works, we choose one fully homomorphic encryption open-source library and two secure computation open-source libraries. The homomorphic encryption library is HElib, which realizes a leveled fully homomorphic encryption BGV [26] and CKKS [23]. As for the MPC libraries, one is the EMP toolkit [19], which realizes a 2 PC protocol Emp-sh2 pc secure against a semi-honest adversary. The other is the MP-SPDZ library [20], which benchmarks various secure multi-party computation (MPC) protocols, such as SPDZ [27], SPDZ2k, MASCOT [28], Overdrive [29], BMR garbled circuits [30], [PERSON]'s garbled circuits, and MPC based on [PERSON]'s secret sharing. For the FHE comparison, we choose the BGV implementation of arithmetic operations in the HElib library and compare the experimental results to our LPCP data. The experiment divides the running time into encryption time, arithmetic operation time and decryption time. Table 4 respectively shows the encryption time, arithmetic operation time, decryption time and total running time of 64-bit and 1024-bit arithmetic operations. In the additive arithmetic operations, the running time of 64-bit and 1024-bit HElib addition is much faster than LPCP. However, the encryption and decryption times of HElib lag behind, which results in the total running time of HElib being slower than LPCP.