Skip to content
A library for lattice-based homomorphic encryption in Go
Go Makefile
Branch: master
Clone or download

Latest commit

Latest commit e61c785 Feb 26, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
bfv cf changelog Feb 25, 2020
ckks cf changelog Feb 25, 2020
dbfv cf changelog Feb 25, 2020
dckks cf changelog Feb 25, 2020
examples Merge branch 'dev_v1.3.0' into encryptor-interface Dec 18, 2019
utils Ring : golint Nov 27, 2019
.gitignore Initial commit Aug 12, 2019
.travis.yml set release date in CHANGELOG and tests cleaning Dec 20, 2019 Update Feb 26, 2020
Makefile Remove -race flag from test_local target Nov 29, 2019
NOTICE Initial commit Aug 12, 2019 Update Feb 26, 2020
go.mod set release date in CHANGELOG and tests cleaning Dec 20, 2019
go.sum Added benchmarks for NTT with BRed Feb 11, 2020

Lattigo: lattice-based cryptographic library in Go

The Lattigo library unleashes the potential of lattice-based cryptography in secure multiparty computation for modern software stacks.

Build Status

Lattigo is a Go package implementing lattice-based cryptographic primitives. The library features:

  • A pure Go implementation bringing code-simplicity and easy builds.
  • A public interface for an efficient multiprecision polynomial arithmetic layer.
  • Comparable performance to state-of-the-art C++ libraries.

Lattigo aims at enabling fast prototyping of secure-multiparty computation solutions based on distributed homomorphic cryptosystems, by harnessing Go's natural concurrency model.

Library overview

The library comprises the following sub-packages:

  • lattigo/ring: RNS-accelerated modular arithmetic operations for polynomials, including: RNS basis extension; RNS rescaling; number theoretic transform (NTT); uniform, Gaussian and ternary sampling.

  • lattigo/bfv: RNS-accelerated Fan-Vercauteren version of Brakerski's scale invariant homomorphic encryption scheme. It provides modular arithmetic over the integers.

  • lattigo/ckks: RNS-accelerated version of the Homomorphic Encryption for Arithmetic for Approximate Numbers (HEAAN, a.k.a. CKKS) scheme. It provides approximate arithmetic over the complex numbers.

  • lattigo/dbfv and lattigo/dckks: Distributed (or threshold) versions of the BFV and CKKS schemes that enable secure multiparty computation solutions with secret-shared secret keys.

  • lattigo/examples: Executable Go programs demonstrating the usage of the Lattigo library. Note that each subpackage includes test files that further demonstrate the usage of Lattigo primitives.

  • lattigo/utils: Supporting structures and functions.

Versions and Roadmap

The first version of Lattigo, (v1.x.x) is meant to be a working prototype. Hence, there will be backward-incompatible changes within this version.

See for the current and past versions.

Upcoming features

  • Bootstrapping for CKKS.
  • README for distributed schemes
  • Network layer implementation of protocols supporting Secure Multiparty Computation (SMC).


This library is still at an experimental stage and should be used for research purposes only.


Lattigo is licensed under the Apache 2.0 License.


If you want to contribute to Lattigo or you have any suggestion, do not hesitate to contact us at


Please use the following BibTex entry for citing Lattigo:

    title = {Lattigo 1.3.1},
    howpublished = {Online: \url{}},
    month = feb,
    year = 2020,
    note = {EPFL-LDS}


  1. Somewhat Practical Fully Homomorphic Encryption (
  2. Computing accross Trust Boundaries using Distributed Homomorphic Cryptography (
  3. A Full RNS Variant of FV Like Somewhat Homomorphic Encryption Schemes (
  4. An Improved RNS Variant of the BFV Homomorphic Encryption Scheme (
  5. Homomorphic Encryption for Arithmetic of Approximate Numbers (
  6. A Full RNS Variant of Approximate Homomorphic Encryption (
  7. Improved Bootstrapping for Approximate Homomorphic Encryption (
  8. Post-quantum key exchange - a new hope (
  9. Faster arithmetic for number-theoretic transforms (
  10. Speeding up the Number Theoretic Transform for Faster Ideal Lattice-Based Cryptography (
  11. Gaussian sampling in lattice-based cryptography (

The Lattigo logo is a lattice-based version of the original Golang mascot by Renee French.

You can’t perform that action at this time.