Table of Contents
Fetching ...

LightPHE: Integrating Partially Homomorphic Encryption into Python with Extensive Cloud Environment Evaluations

Sefik Ilkin Serengil, Alper Ozpinar

TL;DR

LightPHE addresses the lack of practical, Python-based PHE tooling by unifying ten partially homomorphic encryption algorithms under a single, extensible framework. The approach combines a modular design (abstract Homomorphic interface) with algorithm-specific classes to expose common operations (add, multiply, xor, scalar multiply, regeneration) while preserving each scheme’s ciphertext structure. Cloud benchmarks across Colab and Azure Spark demonstrate that LightPHE performs best in high-performance environments (e.g., A100 GPUs, TPU2) while remaining viable on cost-efficient platforms, with insights on key generation costs and decryption trade-offs. The work provides open-source tooling and benchmarks that enable rapid prototyping of secure cloud applications and informs practitioners about selecting cryptosystems and deployment settings for practical secure computation.

Abstract

Homomorphic encryption enables computations on encrypted data without accessing private keys, enhancing security in cloud environments. Without this technology, updates need to be performed on-premises or require transmitting private keys to the cloud, increasing security risks. Fully homomorphic encryption (FHE) supports both additive and multiplicative operations on ciphertexts, while partially homomorphic encryption (PHE) supports either addition or multiplication, offering a more efficient and practical solution. This study introduces LightPHE, a lightweight hybrid PHE framework for Python, designed to address the lack of existing PHE libraries. LightPHE integrates multiple PHE algorithms with a modular and extensible design, ensuring robustness and usability for rapid prototyping and secure application development. Cloud-based experiments were conducted on Google Colab (Normal, A100 GPU, L4 GPU, T4 High RAM, TPU2) and Microsoft Azure Spark to evaluate LightPHE's performance and scalability. Key metrics such as key generation, encryption, decryption, and homomorphic operations were assessed. Results showed LightPHE's superior performance in high-computation environments like Colab A100 GPU and TPU2, while also offering viable options for cost-effective setups like Colab Normal and Azure Spark. Comparative analyses demonstrated LightPHE's efficiency and scalability, making it suitable for various applications. The benchmarks offer insights into selecting appropriate cloud environments based on performance needs, highlighting LightPHE's potential to advance homomorphic encryption for secure and efficient cloud-based data processing.

LightPHE: Integrating Partially Homomorphic Encryption into Python with Extensive Cloud Environment Evaluations

TL;DR

LightPHE addresses the lack of practical, Python-based PHE tooling by unifying ten partially homomorphic encryption algorithms under a single, extensible framework. The approach combines a modular design (abstract Homomorphic interface) with algorithm-specific classes to expose common operations (add, multiply, xor, scalar multiply, regeneration) while preserving each scheme’s ciphertext structure. Cloud benchmarks across Colab and Azure Spark demonstrate that LightPHE performs best in high-performance environments (e.g., A100 GPUs, TPU2) while remaining viable on cost-efficient platforms, with insights on key generation costs and decryption trade-offs. The work provides open-source tooling and benchmarks that enable rapid prototyping of secure cloud applications and informs practitioners about selecting cryptosystems and deployment settings for practical secure computation.

Abstract

Homomorphic encryption enables computations on encrypted data without accessing private keys, enhancing security in cloud environments. Without this technology, updates need to be performed on-premises or require transmitting private keys to the cloud, increasing security risks. Fully homomorphic encryption (FHE) supports both additive and multiplicative operations on ciphertexts, while partially homomorphic encryption (PHE) supports either addition or multiplication, offering a more efficient and practical solution. This study introduces LightPHE, a lightweight hybrid PHE framework for Python, designed to address the lack of existing PHE libraries. LightPHE integrates multiple PHE algorithms with a modular and extensible design, ensuring robustness and usability for rapid prototyping and secure application development. Cloud-based experiments were conducted on Google Colab (Normal, A100 GPU, L4 GPU, T4 High RAM, TPU2) and Microsoft Azure Spark to evaluate LightPHE's performance and scalability. Key metrics such as key generation, encryption, decryption, and homomorphic operations were assessed. Results showed LightPHE's superior performance in high-computation environments like Colab A100 GPU and TPU2, while also offering viable options for cost-effective setups like Colab Normal and Azure Spark. Comparative analyses demonstrated LightPHE's efficiency and scalability, making it suitable for various applications. The benchmarks offer insights into selecting appropriate cloud environments based on performance needs, highlighting LightPHE's potential to advance homomorphic encryption for secure and efficient cloud-based data processing.
Paper Structure (30 sections, 111 equations, 4 figures, 9 tables)

This paper contains 30 sections, 111 equations, 4 figures, 9 tables.

Figures (4)

  • Figure 1: Key Generation Radar Map of Cloud Environments With Respect To The Algorithms
  • Figure 2: Encryption Performances of Algorithms for Different Cloud Environments
  • Figure 3: Decryption Performances of Algorithms for Different Cloud Environments
  • Figure 4: Homomorphic Operation Performances of Algorithms for Different Cloud Environments