// the find
homenc/HElib
HElib is an open-source software library that implements homomorphic encryption. It supports the BGV scheme with bootstrapping and the Approximate Number CKKS scheme. HElib also includes optimizations for efficient homomorphic evaluation, focusing on effective use of ciphertext packing techniques and on the Gentry-Halevi-Smart optimizations.
HElib is a C++ library, built on NTL, that implements the BGV scheme with bootstrapping and the CKKS approximate-number scheme. It suits researchers and engineers who want to prototype homomorphic evaluation and are comfortable reasoning about slots, levels, and noise budgets directly rather than through a high-level API.
- Slot packing is first-class. One ciphertext holds many plaintext slots, and rotations and permutations are exposed directly, so batched workloads like the country lookup and matmul examples are expressible without contortions. Most of the library's value sits in EncryptedArray and the matmul and permutation code.
- BGV with bootstrapping and CKKS live in one codebase, which is uncommon. CKKS-security.md is unusually candid about parameter choices and their security implications, and it's worth reading before you trust any CKKS result.
- Test coverage is broad for a crypto library. There are separate GTest suites for bootstrapping, binary arithmetic, matmul, and polynomial algebra, plus a GitHub CI workflow and bats-driven example tests.
- It is Apache-2.0 licensed and has a long research record behind it, with the design report and the cited algorithm papers. It has been used as a reference implementation in HE research for years.
- The API is low-level by design. You pick moduli chains and manage levels and noise yourself, and a bad parameter set fails in ways that are hard to diagnose. There is no compiler or higher-level abstraction on top to catch those mistakes for you.
- The last push is 2024-08-01, more than two years before today. For a cryptography library that matters, since nothing in this snapshot shows a response to dependency or security issues in that time.
- Building it is heavy. It needs NTL and GMP, and INSTALL.md plus three separate Docker recipes suggest the path is not a one-line CMake dependency for most projects.
- Bootstrapping dominates the cost of deep circuits, as it does in every FHE library. The parameter choices that make it fast are not obvious, and the benchmarks in benchmarks/ only help if your workload resembles them.