A library for Zero-Knowledge Proofs, (verifiable) Fully Homomorphic Encryption, and related techniques.
Project description
vfhe
The VFHE library: a library for Zero-Knowledge Proofs, (verifiable) Fully Homomorphic Encryption, and related techniques.
❗ Warning: This is a pre-release version of the library and is subject to breaking changes. ❗
Modules
Each module is a self-contained folder under modules/. A module is
Python-facing (ships a python/ package + a cdef exposing its C to
Python) or internal C-only (contributes compiled kernels used by other
modules, no Python symbols).
| Module | Kind | What it provides |
|---|---|---|
arith |
Python-facing | RNS polynomial arithmetic over Z_q[X]/(X^N+1): incomplete NTTs, complex FFTs, general multiprecision, and basic number theory procedures |
misc |
Python-facing | The native handle (ffi/lib/libvfhe) plus the internal C utilities: BLAKE3-seeded PRNG, AES-CTR RNG, aligned allocation, mod-switching helpers |
mlwe |
Python-facing | LWE / Module-LWE and MGSW: key generation, encryption, key-switching, arithmetic, and ring morphisms |
fhe |
Python-facing | Schemes on top of mlwe: CKKS (encode/encrypt/rescale/rotate/multiply), CGGI16 functional bootstrap, GP25 sparse-amortized bootstrap |
piop |
Python-facing | Sketch of IOP prover/verifier framework (currently under development) |
circuit |
Python-facing | Layered GKR arithmetic circuits (protobuf wire format) and their polynomial export to arith |
compiler, polycom, snark, vfhe |
placeholder | reserved for the compiler frontend, polynomial commitments, the SNARK layer, and the top-level assembly |
Installing
pip install vfhe
VFHE ships as an sdist only, with no pre-built wheels, so every install compiles
from source and tunes to your CPU. On an x86 machine with AVX-512 IFMA this
enables -march=native, the SIMD kernels, AES-NI, and BLAKE3 SIMD; on any other
CPU it builds the portable engine (and prints a notice). The result targets this
machine. You need a C compiler (clang/gcc); the sdist bundles the BLAKE3 sources,
so no submodules are required.
Choosing the compiler. The build uses your interpreter's compiler by default (no configuration needed). To pick a specific one (e.g. with several installed), set the standard
CCenvironment variable; it steers both the CPU detection and the compile, in lockstep:CC=gcc-14 pip install vfhe
Forcing a portable build. If you build in one place and run in another (Docker image built on a big CI box, run on a smaller node), set
VFHE_PORTABLE=1to skip CPU detection and build the portable engine that runs on any CPU;-march=nativewould otherwise bake in the build host's features and crash elsewhere. When the portable engine ends up on a CPU that does support AVX-512 IFMA, VFHE prints a one-time hint to rebuild tuned (silence it with the usualwarningsfilters).
Development
The development guide, covering the repository layout, the build system, testing,
coverage, and CI, is in
docs/DEVELOPMENT.md.
Contribution expectations are in
CONTRIBUTING.md.
Authors
See AUTHORS.md. Authors are sorted alphabetically by surname,
following mathematical tradition.
Maintainers can be reached at maintainers@vfhe.ai.
Citation
If you use VFHE in academic work, please cite the software using
CITATION.cff (GitHub renders a "Cite this repository"
button from it) and the archived release DOI where relevant. (When a paper is
published, we'll add it as the preferred citation.)
Once a release is archived on Zenodo (enable the GitHub-Zenodo integration, then cut a GitHub release), add the DOI badge here:
[](https://doi.org/10.5281/zenodo.XXXXXXX)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file vfhe-0.0.2.tar.gz.
File metadata
- Download URL: vfhe-0.0.2.tar.gz
- Upload date:
- Size: 224.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77b24b4cbb4841eee52cfb638f3065339fb0932391038a772cda8807636a9f48
|
|
| MD5 |
0cd02544e1143b33cc87bf159e7557b3
|
|
| BLAKE2b-256 |
c563f9fc4ff06db5031521bda6f82dfba4aa6f3eac24193c72166f89fc1114d2
|
Provenance
The following attestation bundles were made for vfhe-0.0.2.tar.gz:
Publisher:
release.yml on vfhe/vfhe
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vfhe-0.0.2.tar.gz -
Subject digest:
77b24b4cbb4841eee52cfb638f3065339fb0932391038a772cda8807636a9f48 - Sigstore transparency entry: 2218086103
- Sigstore integration time:
-
Permalink:
vfhe/vfhe@63a1ecf391f2697da6947fe813a6b3cd35ea6c23 -
Branch / Tag:
refs/tags/0.0.2 - Owner: https://github.com/vfhe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@63a1ecf391f2697da6947fe813a6b3cd35ea6c23 -
Trigger Event:
workflow_dispatch
-
Statement type: