# Empirical Study of Fully Homomorphic Encryption Using Microsoft SEAL
## 3 Methodology
### Experiments Design  
Experiments are carried out in two different batches. In the first batch, we use Visual Studio 2022 in a PC with Windows 10, Intel Core i7-8550U processor, and 8 GB of RAM. In the second batch, we use a Jetson Nano NVIDIA equipped with a quad-core ARM Cortex-A57 processor, 128-core Maxwell GPU, and 4 GB LPDDR4 RAM, using JetPack 4.6. JetPack is NVIDIA's all-inclusive Software Development Kit (SDK) that provides theboard support package, Linux operating system, NVIDIA CUDA, cuDNN, and TensorRT software libraries for deep learning, computer vision, GPU computing, and multimedia processing. The installation of SEAL was performed manually using CMake. In both cases, the study analyzes the impact of varying test parameters on program execution time and CPU resource requirements. The parameters included are as follows:  
* Dataset size, varied to analyze the program's response to different quantities. The sizes tested were 1, 10, 100, 1000, and 10,000 samples, offering a broad range from minimal to large datasets. This dataset is composed of integers that are randomly generated. * Encryption parameters focus on the BFV encryption scheme, specializing in integers, with the variable _poly_modulus_degree_ impacting scheme complexity and operational capacity. The values tested were 1024, 2048, 4098, 8192, 16,384, and 32,768, providing a wide spectrum of results from low to high complexity levels. We chose BFV versus BGV; note that both are efficient in working with integers but BFV is more efficient for lower values of the _plain_modulus_ variable, as explained below [23]. The test program included a detailed setup for SEAL, generating the random numbers for encryption and measuring execution time for various configurations, as shown in Algorithm 1. As for the SEAL setup, when using the BFV scheme, there are three parameters that are key. These are plaintext modulus (_plain_modulus_), poly_modulus_degree_ (_poly_modulus_degree_), and coefficient modulus (_coeff_modulus_). _Plain_modulus_ is an integer that defines the range of integers (coefficients of polynomials) that can be represented and operated on within the encrypted space. That is, the plain modulus determines how data are encoded before encryption. Its main goal is to enable the correct wrapping of integer values during arithmetic operations in the encrypted form. Consequently, this variable sets the bounds for data representation, but it does not affect the computational complexity of encryption. We checked this behavior experimentally, and it is correct. Therefore, the parameter _plain_modulus_ will be kept at a fixed value of 1024 because our dataset contains randomly generated integers smaller than 1024. Next, _coeff_modulus_ is a modulus used for the coefficients of the polynomials that represent encrypted data. As we know, ciphertexts and encryption operations in the BFV scheme are represented as polynomials, and these polynomials' coefficients are reduced modulo of the _coeff_modulus_. The size of the _coeff_modulus_ in homomorphic encryption schemes directly influences security by determining the noise budget. The larger the noise budget is, the larger the amount of noise that can be introduced into the ciphertext before it becomes too corrupted to be decrypted accurately. However, a larger _coeff_modulus_ also increases ciphertext sizes, impacting the encryption system's performance and necessitating a balance between security enhancements and computational efficiency. For this reason, a recommended value for _coeff_modulus_ is given by the SEAL library once the polynomial modulus degree is set. The polynomial modulus degree (_poly_modulus_degree_) determines the size of the polynomials used in the encryption scheme. This parameter influences the performance of encryption. The _Poly_modulus_degree_ must be a positive power of 2, representing the degree of a power-of-two cyclotomic polynomial, which defines the polynomial ring over which all arithmetic operations are conducted.