homomorphepy

homomorphepy hex logo

homomorphepy is privacy-preserving statistics across sites that never share their data. It uses fully homomorphic encryption through the openfhe-python binding of OpenFHE — CKKS for real-valued arithmetic, BFV and BGV for exact integers — with n-of-n threshold key generation so that no single party can decrypt. On top of these it ships master/worker primitives that let ordinary Python modeling code — scipy.optimize.minimize(), stratified Cox partial likelihoods from statsmodels, convex programs via cvxpy — run across sites.

Version 1.0, wrapping OpenFHE 1.5.1. Install it by

pip install homomorphepy

The cox and cox-lasso pages also use statsmodels and cvxpy, which are optional rather than required:

pip install "homomorphepy[stats]"

openfhe is an optional dependency because its published wheels are tagged py3-none-any while containing Linux/CPython-3.12 binaries — pip install reports success on macOS and the import then fails. See the README for the working paths.

The pages build up from a gentle introduction to complete distributed protocols:

Getting started

Distributed statistical modeling under FHE

Gaussian-noise variants

Citing

The package and its protocols are described in Narasimhan (2026), available at https://arxiv.org/abs/2610.04163.

Source

The code is on GitHub.

This page was rendered with the crypto backend available. Every number on these pages was computed through real encryption.

References

Narasimhan, Balasubramanian. 2026. Fully Homomorphic Encryption for Statistical Modeling. https://doi.org/10.48550/arXiv.2610.04163.