As a starting point of the CIBER-CAFE project, we have conducted an evaluation of the performance of the matrix multiplication in the context of Fully Homomorphic Encryption (FHE).
EVALUATED LIBRARIES
We have tested four different state-of-the-art libraries that implement FHE:
PALISADE (http://palisade-crypto.org)
HElib (https://homenc.github.io/HElib/)
TFHE (https://tfhe.github.io/tfhe/)
TESTS CONDUCTED
We offer an exhaustive evaluation that covers all the possible combinations of:
Four different matrix dimensions: 4x4, 8x8, 16x16, 32x32
Two schemes: BFV for matrices with integer values, CKKS for matrices with real values (except for TFHE)
Four different libraries (SEAL, PALISADE, HElib, TFHE)
HE key size of 128 and 256
PLATFORMS
The tests have been conducted in such a way that we characterize the performance on eithers systems that can be equivalent to server nodes, or hardware that can form client/edge nodes.
This is the description of the server-like nodes tested:
c00: equipped with 2 Intel Xeon 4210R processors, 128GB RAM memory.
c01: equipped with 2 Intel Xeon E5-2610 (8 cores each) processors, 32GB RAM memory.
c02: equipped with 2 AMD EPYC 7282 (16 cores each) processors, 256GB RAM memory.
c03: equipped with 2 Intel Xeon 6418H (24 cores each) processors, 2TB RAM memory.
This is the description of the client/edge-like nodes tested:
NVIDIA Jetson AGX Xavier: NVIDIA Carmel Platform (8 cores) at 2.26 GHz, 32GB of DDR4 RAM.
NVIDIA Jetson AGX Orin: ARM A78AE (12 cores) at 2.20 GHz, 64GB of DDR5 RAM.
NVIDIA Jetson Nano: NVIDIA Cortex A57 (4 cores) at 1.48 GHz, 4GB of LPDDR4 RAM.
RESULTS
Please check the project GitHub to see the results obtained.
https://github.com/rociocarratalasaez/CIBER-CAFE/tree/main/CHARACTERIZATION
After Contribution #1, we conducted a deeper analysis of the performance of the matrix multiplication in the context of Fully Homomorphic Encryption (FHE) by evaluating each of the phases that are necessary to complete this opperation.
CHOSEN LIBRARY
After the results observed in Contribution #1, we opted for using SEAL (https://github.com/microsoft/SEAL), which generally outperformed the other evaluated libraries.
TESTS CONDUCTED
We offer an exhaustive evaluation that covers all the possible combinations of:
Eight different matrix dimensions: 1x1, 2x2, 4x4, 8x8, 16x16, 32x32, 64x64, 128x128
One scheme: CKKS for matrices with real values between 0 and 1
Parameters: Precision of 40, HE key size of 128 and 256, various modulus (see the scripts or results for more details).
COMPARISON (REFERENCE)
To enrich the contribution, we do not only implement the HE matrix product, but also compare its performance (with different parameter combination) against that offered by EVA, which automatically optimizes the parameters selection.
As explained by their developers at Microsoft, EVA (https://github.com/microsoft/EVA) is a "compiler for homomorphic encryption, that automates away the parts that require cryptographic expertise. This gives you a simple way to write programs that operate on encrypted data without having access to the secret key."
PLATFORMS
The tests have been conducted on the c01 server-like platform, equipped with 2 Intel Xeon E5-2610 (8 cores each) processors, 32GB RAM memory.
RESULTS
Please check the project GitHub to see the results obtained.
https://github.com/rociocarratalasaez/CIBER-CAFE/tree/main/SEAL-EVA-MMULT