google/heir

A compiler for homomorphic encryption

What it solves

HEIR provides a universal compiler toolchain for homomorphic encryption (HE), simplifying the process of writing and deploying encrypted computations. It removes the need for developers to manually manage the complex low-level details of different HE libraries and schemes.

How it works

Built on the MLIR (Multi-Level Intermediate Representation) framework, HEIR acts as an intermediate layer that translates high-level encrypted operations into optimized code for specific backends. It supports multiple homomorphic encryption schemes (such as BGV, BFV, CKKS, and CGGI) and integrates with various backend libraries like OpenFHE, Lattigo, tfhe-rs, and Jaxite.

Who it’s for

It is designed for developers and researchers working with homomorphic encryption who want to target multiple HE libraries without rewriting their code for each one.

Highlights

  • MLIR-based toolchain for HE compilers.
  • Support for multiple encryption schemes including BGV, BFV, CKKS, and CGGI.
  • Compatible with several backend libraries including OpenFHE and Lattigo.
  • Provides a Python package (heir_py) for easier integration.

Related

  • Dispatch
  • Project
  • Project
  • Project
  • Project