Lattigo: lattice-based multiparty homomorphic encryption library in Go

Lattigo: lattice-based multiparty homomorphic encryption library in Go

Go tests

Lattigo is a Go module that implements Ring-Learning-With-Errors-based homomorphic-encryption primitives and Multiparty-Homomorphic-Encryption-based secure protocols. The library features:

  • An implementation of the full-RNS BFV and CKKS schemes and their respective multiparty versions.
  • Comparable performance to state-of-the-art C++ libraries.
  • Dense-key and sparse-key efficient and high-precision bootstrapping procedures for full-RNS CKKS.
  • A pure Go implementation that enables cross-platform builds, including WASM compilation for browser clients.

Lattigo is meant to support HE in distributed systems and microservices architectures, for which Go is a common choice thanks to its natural concurrency model and portability.

Library overview

The library exposes the following packages:

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

  • lattigo/bfv: The Full-RNS variant of the Brakerski-Fan-Vercauteren scale-invariant homomorphic encryption scheme. It provides modular arithmetic over the integers.

  • lattigo/ckks: The Full-RNS Homomorphic Encryption for Arithmetic for Approximate Numbers (HEAAN, a.k.a. CKKS) scheme. It provides approximate arithmetic over the complex numbers (in its classic variant) and over the real numbers (in its conjugate-invariant variant).

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

  • lattigo/rlwe and lattigo/drlwe: common base for generic RLWE-based multiparty homomorphic encryption. It is imported by the lattigo/bfv and lattigo/ckks packages.

  • lattigo/examples: Executable Go programs that demonstrate the use of the Lattigo library. Each subpackage includes test files that further demonstrate the use of Lattigo primitives.

  • lattigo/utils: Supporting structures and functions.

Versions and Roadmap

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

See CHANGELOG.md for the current and past versions.

Disclaimer

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

License

Lattigo is licensed under the Apache 2.0 License. See LICENSE.

Contact

If you want to contribute to Lattigo or you have any suggestion, do not hesitate to contact us at [email protected].

Citing

Please use the following BibTex entry for citing Lattigo:

@misc{lattigo,
    title = {Lattigo v2.4.0},
    howpublished = {Online: \url{https://github.com/ldsec/lattigo}},
    month = Jan,
    year = 2022,
    note = {EPFL-LDS}
}

References

  1. Efficient Bootstrapping for ApproximateHomomorphic Encryption with Non-Sparse Keys (https://eprint.iacr.org/2020/1203)
  2. Somewhat Practical Fully Homomorphic Encryption (https://eprint.iacr.org/2012/144)
  3. Multiparty Homomorphic Encryption: From Theory to Practice (https://eprint.iacr.org/2020/304)
  4. A Full RNS Variant of FV Like Somewhat Homomorphic Encryption Schemes (https://eprint.iacr.org/2016/510)
  5. An Improved RNS Variant of the BFV Homomorphic Encryption Scheme (https://eprint.iacr.org/2018/117)
  6. Homomorphic Encryption for Arithmetic of Approximate Numbers (https://eprint.iacr.org/2016/421)
  7. A Full RNS Variant of Approximate Homomorphic Encryption (https://eprint.iacr.org/2018/931)
  8. Improved Bootstrapping for Approximate Homomorphic Encryption (https://eprint.iacr.org/2018/1043)
  9. Better Bootstrapping for Approximate Homomorphic Encryption (https://epring.iacr.org/2019/688)
  10. Post-quantum key exchange - a new hope (https://eprint.iacr.org/2015/1092)
  11. Faster arithmetic for number-theoretic transforms (https://arxiv.org/abs/1205.2926)
  12. Speeding up the Number Theoretic Transform for Faster Ideal Lattice-Based Cryptography (https://eprint.iacr.org/2016/504)
  13. Gaussian sampling in lattice-based cryptography (https://tel.archives-ouvertes.fr/tel-01245066v2)

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

Similar Resources

Go implementation of the Data At Rest Encryption (DARE) format.

Secure IO Go implementation of the Data At Rest Encryption (DARE) format. Introduction It is a common problem to store data securely - especially on u

Dec 18, 2022

A simple, semantic and developer-friendly golang package for encoding&decoding and encryption&decryption

A simple, semantic and developer-friendly golang package for encoding&decoding and encryption&decryption

Jan 4, 2023

Encryption & Decryption package for golang

encdec Encryption & Decryption package for golang func main() { startingTime := time.Now() privKey, pubKey := GenerateRsaKeyPair() fmt.Println("Priva

Feb 11, 2022

A tool for secrets management, encryption as a service, and privileged access management

A tool for secrets management, encryption as a service, and privileged access management

Deploy HCP Vault & AWS Transit Gateways via Terraform https://medium.com/hashicorp-engineering/deploying-hcp-vault-using-the-hcp-terraform-provider-5e

Nov 23, 2021

TTAK.KO-12.0223 Lightweight Encryption Algorithm with Galois/Counter Mode (LEA-GCM)

LEACrypt The Lightweight Encryption Algorithm (also known as LEA) is a 128-bit block cipher developed by South Korea in 2013 to provide confidentialit

Dec 16, 2022

Functional encryption for images

ImageFE Functional encryption for images. Introduction In the traditional cryptography framework, a decryptor either recovers the entire plaintext fro

Mar 8, 2022

Go Encrypt! Is a simple command-line encryption and decryption application using AES-256 GCM.

Go Encrypt! Go Encrypt! is a command-line application used to easily encrypt and decrypt files with the AES-256 GCM encryption algorithm. Usage Usage

Jan 5, 2022

Ubiq-fpe-go - Format preserving encryption in Go

Format Preserving Encryption in Go An implementation of the NIST-approved FF1 an

Oct 19, 2022

Length-preserving encryption algorithm

hctr2 Length-preserving encryption algorithm https://eprint.iacr.org/2021/1441.pdf Security Disclosure This project uses full disclosure. If you find

Nov 15, 2022
Related tags
Attempts to make attribute based encryption work, particularly trying out bn256 pairing curve
Attempts to make attribute based encryption work, particularly trying out bn256 pairing curve

EC Pairings over bn256 This is an attempt to solve the core problem of attribute based encryption, where the goal is to be able to use CA-issued attri

Jan 5, 2022
This is a simplification of the attribute-based-encryption padlock concept

A Cryptographic ABE Padlock This is a simplification of the attribute-based-encryption padlock concept. This implementation is just focusing on gettin

Mar 27, 2022
A simple, modern and secure encryption tool (and Go library) with small explicit keys, no config options, and UNIX-style composability.
A simple, modern and secure encryption tool (and Go library) with small explicit keys, no config options, and UNIX-style composability.

A simple, modern and secure encryption tool (and Go library) with small explicit keys, no config options, and UNIX-style composability.

Jan 7, 2023
Easy to use encryption library for Go

encryptedbox EncryptedBox is an easy to use module for Go that can encrypt or sign any type of data. It is especially useful when you must serialize y

Jul 20, 2022
The minilock file encryption system, ported to pure Golang. Includes CLI utilities.
The minilock file encryption system, ported to pure Golang. Includes CLI utilities.

Go-miniLock A pure-Go reimplementation of the miniLock asymmetric encryption system. by Cathal Garvey, Copyright Oct. 2015, proudly licensed under the

Nov 28, 2022
An easy-to-use XChaCha20-encryption wrapper for io.ReadWriteCloser (even lossy UDP) using ECDH key exchange algorithm, ED25519 signatures and Blake3+Poly1305 checksums/message-authentication for Go (golang). Also a multiplexer.

Quick start Prepare keys (on both sides): [ -f ~/.ssh/id_ed25519 ] && [ -f ~/.ssh/id_ed25519.pub ] || ssh-keygen -t ed25519 scp ~/.ssh/id_ed25519.pub

Dec 30, 2022
Sekura is an Encryption tool that's heavily inspired by the Rubberhose file system.

It allows for multiple, independent file systems on a single disk whose existence can only be verified if you posses the correct password.

Oct 16, 2022
A document encryption solution for the reMarkable 2 ePaper tablet.

Remarkable 2 Encryption This repository contains multiple tools to encrypt the home folder of the reMarkable 2 epaper tablet using gocryptfs. Detailed

Nov 7, 2022
A super easy file encryption utility written in go and under 800kb
A super easy file encryption utility written in go and under 800kb

filecrypt A super easy to use file encryption utility written in golang ⚠ Help Wanted on porting filecrypt to other programing languages NOTE: if you

Nov 10, 2022
Encryption Abstraction Layer and Utilities for ratnet

What is Bencrypt? Bencrypt is an abstraction layer for cryptosystems in Go, that lets applications use hybrid cryptosystems without being coupled to t

Nov 9, 2022