# Empirical Study of Fully Homomorphic Encryption Using Microsoft SEAL
## 4 Results  
This section presents the results from the series of experimental tests evaluating homomorphic encryption on datasets, specifically using Microsoft's SEAL library. Homomorphic encryption, as discussed in the earlier sections, allows for operations to be performed directly on encrypted data, showcasing vast potential in security and privacy protection. SEAL is highlighted as a prime choice for the practical implementation of homomorphic encryption in projects today. The experimental tests focused on two main factors: CPU usage and the execution time necessary for encrypting datasets. The primary goal was to identify optimal parameter values for the best performance across different scenarios, understanding how parameter variations impact performance, particularly concerning the encryption scheme used and the dataset size. The results for the first test batch, which was conducted using Visual Studio 2022 in a Windows 10 environment with the system powered by an Intel Core i7-8550U processor and 8 GB of RAM, are depicted in Figure 1. It can be observed that the execution time varied significantly with dataset size and _poly_modulus_degree_ value. Smaller datasets and lower degrees showed faster execution times, while larger datasets and higher degrees increased execution time exponentially, indicating a direct correlation between data complexity, encryption scheme complexity, and performance. The CPU load was closely monitored to assess the efficiency and practicality of homomorphic encryption in real-world applications. In this case, the Windows resource monitoring tool was used to monitor the CPU activity for 60 s, during which time various executions of the program were performed. The process to followed involves performing the tests, keeping a fixed value for the degree of the polynomial, and varying the size of the dataset to see the changes it produces in the CPU load. Then, the same process will be repeated for all the values of the polynomial degree studied in this work. For each configuration, we ran the program twice to correctly obtain the results, since the first run involves compiling and configuration and does not really show the result of the clean encryption. Nevertheless, both runs are shown in the illustrations. From Figures 2-4, the tests reveal that higher _poly_modulus_degree_ values and larger datasets demand substantially more CPU resources, confirming the need for optimized parameter selection to balance security, privacy, and performance effectively. Figure 1: Average execution time for experiments run on a PC. Experiments were run five times for each configuration and the average values are shown. (**a**) Execution time. For the _poly_modulus_degree_ with a value of 32,768, the execution failed for the largest dataset and was not able to finish. (**b**) Zoomed in. Figure 2: CPU load using a _poly_modulus_degree_ of 1024; white arrows show the first execution and red arrows mark the second execution: (**a**) 1 and 10 samples; (**b**) 100 and 1000 samples; (**c**) 10,000 samples. From the results shown in Figure 2, using a _poly_modulus_degree_ of 1024, it can be seen that in the first run the CPU load oscillates around 70% for all the data sizes. In the second run, we can see that the larger the size is, the higher the load achieved, especially for large values. The highest increase is reached at 10,000 encrypted integers, where up to 30% is used, while small and medium values remain between 10% and 20%. For a polynomial degree value of 8192 and 10,000 samples, as in Figure 3, on average an 80% CPU load is reached in the first run, whereas in the second run it varies from 20% in small values and 30% in medium values up to peaks of 60% or 70%. Using a _poly_modulus_degree_ of 16,384 and 1000 samples, as in Figure 4, the results show that in the first run an average of 70% of the peak CPU load is reached. It is so demanding that it reaches almost 100% load. For the second run, the load oscillates around 30%.