# Potential of Homomorphic Encryption for Cloud Computing Use Cases in Manufacturing
## 3 Encryption for Cloud Computing in Manufacturing
### Experimental Comparison of Classic and Homomorphic Encryption
#### 3.3.2 Experimental Results  
To compare homomorphic with classic encryption, two major categories are considered: computation time and the amount of transferred data. The computation time is, on the one hand, directly related to the energy usage and, thus, cost. On the other hand, it is an important factor in the manufacturing industry in order to cope with the latency requirements of applications [40]. The computation time was measured by recording the computation time of the used hardware. The data transfer is important, as the cost of data transfer is constantly rising, and data transfer might be a significant cost factor in the future [5]. The data transfer was measured by recording the number of kilobytes. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Calculation Operation** & **Addition** & **Multiplication** & **Average** \\ \hline Manufacturing & Calculation of daily consumption & Calculation of electricity costs of & Calculation of average \\ analysis scenario & of cooling lubricant on one & the manufacturing line in a & temperature in a cold store over a machine \\  & machine & certain interval & certain time interval \\ Compared classic & & Python Ferret Library/Fermet & \\ encryption technology & & PHE & SWHE/FHE \\ HE category & (Python/Paillier) & (Pyfhe/BFV/CKKS) & (Pyfhe/CKKS) \\ Hardware/operating system & & AMD Ryzen 7 3700X \& Kern 3600 MHz/Linux Debian 64 bit \\ \hline \hline \end{tabular} HE: homomorphic encryption, PHE: partially homomorphic encryption, SWHE: somewhat homomorphic encryption; FHE: fully homomorphic encryption.  
\end{table} 
Table 2: Experimental setup to validate the potential and challenges of homomorphic encryption. The computation time was analyzed for encryption and decryption in three scenarios. For encryption and decryption, the computation time for the entire dataset was compared between classic encryption and homomorphic encryption. It was found that encryption using homomorphic encryption took 360 times longer than with classic encryption. The total decryption time of homomorphic encryption, on the other hand, only took 20% of classic encryption. These results can be attributed to the fact that only the results had to be decrypted when using homomorphic encryption; using classic encryption, decryption was necessary for each calculation, leading to a higher total description time. Nevertheless, despite a slightly faster decryption time, the total encryption and decryption time of homomorphic encryption was significantly higher. Moreover, the absolute value (95.49 s homomorphic encryption vs. 0.265 s classic encryption) can be an issue in manufacturing practice. The first cloud computing scenario considered an addition. Since this calculation only covers one operator, a partially homomorphic encryption (PHE) method was considered for the comparison with classical encryption. As shown in Figure 5, the calculation times between classical and homomorphic encryption differed by a factor of 760. However, for both classic and homomorphic encryption, the absolute values were below 0.1 s. In practice, this difference might be neglectable. The second cloud computing scenario considered a multiplication. All homomorphic encryption categories would be suitable; however, as the available PHE libraries are not suitable for multiplications, we only considered somewhat homomorphic encryption (SWHE) and fully homomorphic encryption method (FHE). Accordingly, the number of operations was limited to 16; otherwise, the calculation error of the SWHE would have been too large (see Section 2.2.2). The comparison shows that SWHE required slightly less computing time. As shown in Figure 5, both SWHE and FHE required approximately \(10^{5}\) times more computing time than classic encryption. Again, the applicability of absolute values of 10 s for SWHE and FHE must be considered for the specific application. The third cloud computing scenario considered an average calculation, whereby both addition and multiplication operations are necessary.