Skip to content
Jonathan Saylor edited this page Dec 18, 2021 · 9 revisions

Welcome to the OpenFHE Wiki

OpenFHE is an open source project. We are pleased to announce that we are in the process of transitioning to fiscal sponsorship by NumFOCUS.org. Please see our OpenFHE Governance document for a listing of the various OpenFHE teams and their responsibilities. Also see our Code of Conduct for guidance on the responsibilities of our contributors and maintainers.

This wiki is a collection of useful information for users. We welcome additional material from the community. Please send any suggestions, additional suggested documentation and general correspondence to

or

OpenFHE Introduction

OpenFHE is a general lattice cryptography library that currently includes efficient implementations of the following lattice cryptography capabilities:

  • Fully Homomorphic Encryption (FHE)
    • Brakerski/Fan-Vercauteren (BFV) scheme for integer arithmetic
    • Brakerski-Gentry-Vaikuntanathan (BGV) scheme for integer arithmetic
    • Cheon-Kim-Kim-Song (CKKS) scheme for real-number arithmetic
    • Ducas-Micciancio (FHEW) and Chillotti-Gama-Georgieva-Izabachene (TFHE) schemes for Boolean circuit evaluation
  • Multi-Party Extensions of FHE (to support multi-key FHE)
    • Threshold FHE for BGV, BFV, and CKKS schemes
    • Proxy Re-Encryption for BGV, BFV, and CKKS schemes

Note as of version 1.11, the following features have been moved to their own repositories in the OpenFHE group.

All the research prototypes for Key-Policy Attributed-Based Encryption and Program Obfuscation have been moved to https://gitlab.com/palisade/palisade-trapdoor)

OpenFHE is a cross-platform C++11 library supporting Linux, Windows, and macOS. The supported compilers are g++ v6.1 or later and clang++ v6.0 or later.

The library also includes unit tests and sample application demos.

OpenFHE is available under the BSD 2-clause license.

The library is based on modular architecture with the following layers:

  • Math operations layer supporting low-level modular arithmetic, number theoretic transforms, and integer sampling. This layer is implemented to be portable to multiple hardware computation substrates.
  • Lattice operations layer supporting lattice operations, ring algebra, and lattice trapdoor sampling.
  • Crypto layer containing efficient implementations of lattice cryptography schemes.
  • Encoding layer supporting multiple plaintext encodings for cryptographic schemes.

A major focus is on the usability of the schemes. For instance, all FHE schemes with packing use the same common API, and are implemented using runtime polymorphism.

OpenFHE implements efficient Residue Number System (RNS) algorithms to achieve high performance for BGV, BFV, and CKKS, e.g., OpenFHE was used as the library for a winning genome-wide association studies solution at iDASH'18.

By default, the library is built without external dependencies. But the user is also provided options to add GMP/NTL and/or tcmalloc (thread sensitive memory allocation) third-party libraries if desired.

Getting Started with OpenFHE

To become familiar with OpenFHE, we recommend that you review the following wiki articles:

  1. General (OS-independent) Build instructions
    1. Building OpenFHE in Linux
    2. Building OpenFHE in Windows
    3. Building OpenFHE in macOS
    4. Customizing the builds using CMake/make flags
  2. Instructions for building C++ projects that use OpenFHE
  3. Explore the OpenFHE library directory structure
  4. Use the OpenFHE library

To get familiar with the main API of OpenFHE, we recommend looking at the code of the following examples:

  1. FHE for arithmetic over integers (BFV):
    1. Simple Code Example
    2. Simple Code Example with Serialization
  2. FHE for arithmetic over integers (BGV):
    1. Simple Code Example
    2. Simple Code Example with Serialization
  3. FHE for arithmetic over real numbers (CKKS):
    1. Simple Code Example
    2. Advanced Code Example
    3. Advanced Code Example for High-Precision CKKS
  4. FHE for Boolean circuits (FHEW/TFHE):
    1. Simple Code Example
    2. Code with JSON serialization
    3. Code with Binary Serialization
  5. Threshold FHE:
    1. Code Example for BGV, BFV, and CKKS

Further Documentation

Documents and README.md files in the OpenFHE repo tree:

  1. OpenFHE User Manual contains detailed descriptions of the OpenFHE library and how to use it in applications
  2. OpenFHE Webinars are YouTube videos (recorded monthly) that introduce and and discuss latest news on OpenFHE, homomorphic encryption, and applications of homomorphic encryption
  3. OpenFHE API is the API documentation automatically generated using Doxygen
  4. OpenFHE Release Notes are updates for every major and minor release
  5. Benchmarking OpenFHE code in the benchmark directory
  6. Example Programs for the Public Key Encryption (PKE) Module in the src/pke/examples directory
  7. The OpenFHE Lattice Layer in the src/core/include/lattice directory
  8. Various Mathematical Backends for Multiprecision Arithmetic in the src/core/include/math directory
  9. Discrete Gaussian Sampling implemented in OpenFHE in the src/core/include/math directory

Wiki pages in doc/wiki

  1. This Home page
  2. Publications on Lattice Crypto Scheme Implementations in OpenFHE
  3. Known Issues
  4. CI Documentation
  5. Exception Handling
  6. Frequently Asked Questions
  7. How To Rebase a Feature Branch from the Master Branch

Modifying and Improving OpenFHE

We encourage you to modify and improve upon OpenFHE. Please refer to the Contributing.md file for details on following our process for Major and Minor contributions, as well as discussions of our programming style requirements. Contributing.md.

  • If you plan major modifications of OpenFHE, please consult with us first, as OpenFHE is a work in progress. This way you can make sure your additions will be consistent with the planned releases of OpenFHE. It will also ensure that you base your changes on the most recent version of the development library.

  • All additions to the released versions of OpenFHE are subject to approval by the OpenFHE governance team as outlined in the OpenFHE Governance document.

License Information

The OpenFHE library uses the 2-clause BSD license which makes it easier for companies and other organizations to use the software and incorporate it into products without worry of entangling and distracting licensing issues.

Thanks to Our Contributors

Up-to-date lists of the organizations that have contributed and/or used OpenFHE and the organizations that sponsored OpenFHE development are available at https://palisade-crypto.org/community/.

An up-to-date list of core and community developers who have contributed code or algorithms to OpenFHE is provided in the Contributors wiki article.

How to Cite OpenFHE

To cite OpenFHE in academic papers, please use the following BibTeX entry. If a different (older) version is used, please update the release version and month/year using the date from https://github.com/openfheorg/openfhe-temp/blob/main//Release_Notes.md

@misc{OpenFHE,
    title = {{OpenFHE} {L}attice {C}ryptography {L}ibrary (release 1.11.2)},
    howpublished =  {\url{https://palisade-crypto.org/}},
    month = May,
    year = 2021,
}

Frequently Asked Questions

Please see the OpenFHE Frequently-Asked-Questions Page for a list of common issues and solutions.

Clone this wiki locally