$npx skillfedfor your agent

lightphe

A Lightweight Partially Homomorphic Encryption Library for Python

With conditionsPyPI CryptographyReleased May 2026149.0K downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — lightphe-0.0.25-py3-none-any.whl
v0.0.25 · released 2026-05-12 · Python >=3.5.5 · 3 runtime deps: sympy, tqdm, lightecc

Yes, if you need a practical homomorphic encryption library for a specific use case (addition, multiplication, or bitwise operations) and want to avoid the performance cost of fully homomorphic encryption. The library is actively maintained, has no known vulnerabilities, low install friction, and permissive licensing. However, verify that the specific algorithm you need is production-ready and suitable for your security requirements before deploying to sensitive workloads.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low install friction with a pure Python wheel distribution.
  • Actively maintained as of 2026-05-13 with recent releases.
  • Depends on sympy, tqdm, and lightecc—all standard Python packages with no compiled dependencies.

License · maintenance · safety

permissive license (permissive) — Licensed under MIT (permissive), so you can use, modify, and distribute LightPHE freely in commercial and private projects with minimal restrictions.

last release 2026-05-12 (94 days) · last repo commit 2026-05-13 · 105 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 148,980 downloads/mo, #11,010 on PyPI

Verify before relying

pip install lightphe

from lightphe import LightPHE

cs = LightPHE(algorithm_name="Paillier")
m1 = 10000
c1 = cs.encrypt(m1)
c2 = cs.encrypt(500)
c3 = c1 + c2  # homomorphic addition
result = cs.decrypt(c3)
  • Whether the library has undergone formal cryptographic audit or security review
  • Performance characteristics and practical key/ciphertext sizes for production workloads
  • Whether all algorithms are production-ready or some are experimental
  • Actual decryption result values for homomorphic operations in real usage
Same gist for agents: .md · .json

What it is and what it does

LightPHE is a Python library that implements multiple partially and somewhat homomorphic encryption schemes—cryptographic systems that allow specific operations (addition, multiplication, or bitwise operations) to be performed directly on encrypted data without decryption. It supports algorithms including RSA (multiplicatively homomorphic), Paillier and Damgard-Jurik (additively homomorphic), and elliptic curve variants in Weierstrass, Edwards, and Koblitz forms.

The library is designed as a practical alternative to fully homomorphic encryption when your use case only requires limited operations on encrypted data. It trades off full generality for speed, smaller ciphertexts, smaller keys, and lower memory overhead—making it suitable for memory-constrained environments and cloud offloading scenarios where you encrypt locally, send ciphertexts to an untrusted server for computation, and decrypt results locally.

Use it for

  • Encrypt salary data locally, perform raises and bonuses as homomorphic addition in the cloud, decrypt results without revealing plaintext to the server
  • Build encrypted analytics pipelines where aggregations happen on ciphertexts without exposing individual records
  • Implement secure multi-party computation where parties exchange encrypted values and perform allowed operations without sharing private keys
  • Prototype homomorphic encryption workflows before committing to slower fully homomorphic schemes
  • Encrypt genomic or medical data and perform statistical operations on encrypted records for privacy-preserving research

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need a practical homomorphic encryption library for a specific use case (addition, multiplication, or bitwise operations) and want to avoid the performance cost of fully homomorphic encryption.

The library is actively maintained, has no known vulnerabilities, low install friction, and permissive licensing. However, verify that the specific algorithm you need is production-ready and suitable for your security requirements before deploying to sensitive workloads.

Install

lightphe on PyPI

Before you install

Low install friction with a pure Python wheel distribution. Actively maintained as of 2026-05-13 with recent releases. Depends on sympy, tqdm, and lightecc—all standard Python packages with no compiled dependencies.

License in practice

Licensed under MIT (permissive), so you can use, modify, and distribute LightPHE freely in commercial and private projects with minimal restrictions.

Quickstart

pip install lightphe

from lightphe import LightPHE

cs = LightPHE(algorithm_name="Paillier")
m1 = 10000
c1 = cs.encrypt(m1)
c2 = cs.encrypt(500)
c3 = c1 + c2  # homomorphic addition
result = cs.decrypt(c3)

Verify before relying

  • Whether the library has undergone formal cryptographic audit or security review
  • Performance characteristics and practical key/ciphertext sizes for production workloads
  • Whether all algorithms are production-ready or some are experimental
  • Actual decryption result values for homomorphic operations in real usage

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.5.5
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
sympytqdmlightecc
MaintenanceActively maintained 94 days since the last release
Last repo commit
First released
Downloads148,980 / month, #11,010 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Evidence: lightphe-0.0.25-py3-none-any.whl

Tags

Capabilities
homomorphic encryption pythonpartially homomorphic encryption libraryencrypt and compute without decryptionpaillier rsa elgamal pythonelliptic curve encryption schemeslightweight cryptographic libraryadditive multiplicative homomorphic
Topics
homomorphic-encryptioncryptographyprivacy-preserving

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “homomorphic encryption python”

  • lightpheLightPHE provides a Python library implementing partially and…
  • tensealTenSEAL performs homomorphic encryption operations on tensors,…
  • pyragepyrage provides Python bindings to the Rust implementation of age,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Cryptography packages

certifi Worth it
PyPI · Cryptography · released Jul 2026

Certifi provides Mozilla's curated collection of root SSL certificates for Python applications to validate TLS hosts and verify certificate trustworthiness.

MPL-2.0pure Python · 3.7+
1.9Bdownloads / mo
cryptography Worth it
PyPI · Cryptography · released Jul 2026

cryptography provides cryptographic recipes and low-level primitives for symmetric encryption, message digests, key derivation, and other common cryptographic algorithms in Python.

Apache-2.0 OR BSD-3-Clausecompiled wheel
1.5Bdownloads / mo
rsa Skip
PyPI · Cryptography · released Apr 2025

Pure-Python RSA encryption, decryption, signing, and key generation following PKCS#1 v1.5, with command-line and library interfaces.

Apache-2.0pure Pythonabandoned
299.6Mdownloads / mo
pyOpenSSL With conditions
PyPI · Python Modules · released Aug 2026

pyOpenSSL wraps OpenSSL's SSL/TLS functionality for Python, providing high-level connection objects and certificate handling through a Python-friendly interface around OpenSSL's cryptographic operations.

Apache-2.0pure Python · 3.9+
294.2Mdownloads / mo
azure-identity Worth it
PyPI · Cryptography · released Mar 2026

Provides Microsoft Entra ID token-based authentication for Azure SDK clients through a set of TokenCredential implementations that handle OAuth flows and managed identity support.

license unclearpure Python · 3.9+
247.2Mdownloads / mo
PyNaCl Worth it
PyPI · Cryptography · released Jan 2026

PyNaCl provides Python bindings to libsodium for digital signatures, secret-key and public-key encryption, hashing, message authentication, and password-based key derivation.

Apache-2.0compiled wheel · 3.8+
246.6Mdownloads / mo

See also lightdsa · lightecc · tenseal · eciespy · gmssl · sslcrypto · py-ecc · PGPy · pycryptodomex · py_arkworks_bls12381