-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #379 from tuneinsight/dev_release_v4.2.0
Release v5
- Loading branch information
Showing
361 changed files
with
45,697 additions
and
33,263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,13 +6,15 @@ | |
|
||
![Go tests](https://github.com/tuneinsight/lattigo/actions/workflows/ci.yml/badge.svg) | ||
|
||
Lattigo is a Go module that implements Ring-Learning-With-Errors-based homomorphic-encryption | ||
Lattigo is a Go module that implements full-RNS 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, BGV 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. | ||
|
||
- Optimized arithmetic for power-of-two cyclotomic rings. | ||
- Advanced and scheme-agnostic implementation of RLWE-based primitives, key-generation, and their multiparty version. | ||
- Implementation of the BFV/BGV and CKKS schemes and their multiparty version. | ||
- Support for RGSW, external product and LMKCDEY blind rotations. | ||
- A pure Go implementation, enabling cross-platform builds, including WASM compilation for | ||
browser clients, with comparable performance to state-of-the-art C++ libraries. | ||
|
||
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. | ||
|
@@ -21,32 +23,89 @@ is a common choice thanks to its natural concurrency model and portability. | |
|
||
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/he`: The main package of the library which provides scheme-agnostic interfaces | ||
and Homomorphic Encryption for different plaintext domains. | ||
|
||
- `hebin`: Homomorphic Encryption for binary arithmetic. It comprises blind rotations (a.k.a Lookup Tables) over RLWE ciphertexts. | ||
|
||
- `hefloat`: Homomorphic Encryption for fixed-point approximate arithmetic over the complex or real numbers. | ||
|
||
- `bootstrapper`: Bootstrapping for fixed-point approximate arithmetic over the real | ||
and complex numbers, with support for the Conjugate Invariant ring, batch bootstrapping with automatic | ||
packing/unpacking of sparsely packed/smaller ring degree ciphertexts, arbitrary precision bootstrapping, | ||
and advanced circuit customization/parameterization. | ||
|
||
- `heint`: Homomorphic Encryption for modular arithmetic over the integers. | ||
|
||
- `lattigo/mhe`: Package for multiparty (a.k.a. distributed or threshold) key-generation and | ||
interactive ciphertext bootstrapping with secret-shared secret keys. | ||
|
||
- `mhefloat`: Homomorphic decryption and re-encryption from and to Linear-Secret-Sharing-Shares, | ||
as well as interactive ciphertext bootstrapping for the package `he/hefloat`. | ||
|
||
- `lattigo/bfv`: The Full-RNS variant of the Brakerski-Fan-Vercauteren scale-invariant homomorphic | ||
encryption scheme. It provides modular arithmetic over the integers. | ||
- `mheint`: Homomorphic decryption and re-encryption from and to Linear-Secret-Sharing-Shares, | ||
as well as interactive ciphertext bootstrapping for the package `he/heint`. | ||
|
||
- `lattigo/bgv`: The Full-RNS variant of the Brakerski-Gentry-Vaikuntanathan 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/schemes`: A package implementing RLWE-based homomorphic encryption schemes. | ||
|
||
- `lattigo/dbfv`, `lattigo/dbgv` and `lattigo/dckks`: Multiparty (a.k.a. distributed or threshold) | ||
versions of the BFV, BGV and CKKS schemes that enable secure multiparty computation solutions with | ||
secret-shared secret keys. | ||
- `bfv`: A Full-RNS variant of the Brakerski-Fan-Vercauteren scale-invariant homomorphic | ||
encryption scheme. This scheme is instantiated via a wrapper of the `bgv` scheme. | ||
It provides modular arithmetic over the integers. | ||
|
||
- `lattigo/rlwe` and `lattigo/drlwe`: common base for generic RLWE-based multiparty homomorphic | ||
encryption. It is imported by the `lattigo/bfv`, `lattigo/bgv` and `lattigo/ckks` packages. | ||
- `bgv`: A Full-RNS generalization of the Brakerski-Fan-Vercauteren scale-invariant (BFV) and | ||
Brakerski-Gentry-Vaikuntanathan (BGV) homomorphic encryption schemes. | ||
It provides modular arithmetic over the integers. | ||
|
||
- `ckks`: A Full-RNS Homomorphic Encryption for Arithmetic for Approximate Numbers (HEAAN, | ||
a.k.a. CKKS) scheme. It provides fixed-point approximate arithmetic over the complex numbers (in its classic | ||
variant) and over the real numbers (in its conjugate-invariant variant). | ||
|
||
- `lattigo/core`: A package implementing the core cryptographic functionalities of the library. | ||
|
||
- `rlwe`: Common base for generic RLWE-based homomorphic encryption. | ||
It provides all homomorphic functionalities and defines all structs that are not scheme-specific. | ||
This includes plaintext, ciphertext, key-generation, encryption, decryption and key-switching, as | ||
well as other more advanced primitives such as RLWE-repacking. | ||
|
||
- `rgsw`: A Full-RNS variant of Ring-GSW ciphertexts and the external product. | ||
|
||
- `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/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. | ||
- `lattigo/utils`: Generic utility methods. This package also contains the following sub-pacakges: | ||
- `bignum`: Arbitrary precision linear algebra and polynomial approximation. | ||
- `buffer`: Efficient methods to write/read on `io.Writer` and `io.Reader`. | ||
- `factorization`: Various factorization algorithms for medium-sized integers. | ||
- `sampling`: Secure bytes sampling. | ||
- `structs`: Generic structs for maps, vectors and matrices, including serialization. | ||
|
||
```mermaid | ||
--- | ||
title: Packages Dependency & Organization | ||
--- | ||
flowchart LR | ||
RING(RING) --> RLWE(RLWE) | ||
RLWE --> RGSW(RGSW) | ||
RLWE --> HE([HE]) | ||
RLWE --> CKKS{{CKKS}} | ||
RGSW --> HEBin{HEBin} | ||
HE --> HEFloat{HEFloat} | ||
HE --> HEInt{HEInt} | ||
BFV/BGV --> HEInt | ||
CKKS --> HEFloat | ||
RLWE --> BFV/BGV{{BFV/BGV}} | ||
MHE --> MHEFloat | ||
HEFloat --> MHEFloat((MHEFloat)) | ||
HEFloat --> Bootstrapping | ||
HEInt --> MHEInt((MHEInt)) | ||
RLWE --> MHE([MHE]) | ||
MHE --> MHEInt | ||
``` | ||
|
||
## Versions and Roadmap | ||
|
||
|
@@ -86,61 +145,28 @@ us before doing so to make sure that the proposed changes are aligned with our d | |
|
||
External pull requests only proposing small or trivial changes will be converted to an issue and closed. | ||
|
||
## Support and Issues | ||
|
||
The GitHub issues should only be used for bug reports and questions directly related to the use or the implementation of the library. | ||
Any other issue will be closed, and for this we recommend the use of [GitHub discussions](https://github.com/tuneinsight/lattigo/discussions) or other topic-specific forums instead. | ||
Any new issue regarding an unexpected behavior of the library or one of its packages must be accompanied | ||
by a self-contained `main.go` reproducing the unwanted behavior. | ||
|
||
## License | ||
|
||
Lattigo is licensed under the Apache 2.0 License. See [LICENSE](https://github.com/tuneinsight/lattigo/blob/master/LICENSE). | ||
|
||
## Contact | ||
|
||
If you want to contribute to Lattigo, to contact us directly or to report a security issue, please do so using the following email: [[email protected]](mailto:[email protected]). | ||
Before contacting us directly, please make sure that your request cannot be handled through an issue. | ||
|
||
If you want to contribute to Lattigo, have a feature proposal or request, to report a security issue or simply want to contact us directly, please do so using the following email: [[email protected]](mailto:[email protected]). | ||
|
||
## Citing | ||
|
||
Please use the following BibTex entry for citing Lattigo: | ||
|
||
@misc{lattigo, | ||
title = {Lattigo v4}, | ||
title = {Lattigo v5}, | ||
howpublished = {Online: \url{https://github.com/tuneinsight/lattigo}}, | ||
month = Aug, | ||
year = 2022, | ||
month = Nov, | ||
year = 2023, | ||
note = {EPFL-LDS, Tune Insight SA} | ||
} | ||
|
||
## References | ||
|
||
1. Efficient Bootstrapping for Approximate Homomorphic Encryption with Non-Sparse Keys | ||
(<https://eprint.iacr.org/2020/1203>) | ||
1. Bootstrapping for Approximate Homomorphic Encryption with Negligible Failure-Probability by Using Sparse-Secret Encapsulation | ||
(<https://eprint.iacr.org/2022/024>) | ||
1. Somewhat Practical Fully Homomorphic Encryption (<https://eprint.iacr.org/2012/144>) | ||
1. Multiparty Homomorphic Encryption from Ring-Learning-With-Errors (<https://eprint.iacr.org/2020/304>) | ||
2. An Efficient Threshold Access-Structure for RLWE-Based Multiparty Homomorphic Encryption (<https://eprint.iacr.org/2022/780>) | ||
3. A Full RNS Variant of FV Like Somewhat Homomorphic Encryption Schemes | ||
(<https://eprint.iacr.org/2016/510>) | ||
4. An Improved RNS Variant of the BFV Homomorphic Encryption Scheme | ||
(<https://eprint.iacr.org/2018/117>) | ||
5. Homomorphic Encryption for Arithmetic of Approximate Numbers (<https://eprint.iacr.org/2016/421>) | ||
6. A Full RNS Variant of Approximate Homomorphic Encryption (<https://eprint.iacr.org/2018/931>) | ||
7. Improved Bootstrapping for Approximate Homomorphic Encryption | ||
1. Fully Homomorphic Encryption without Bootstrapping (<https://eprint.iacr.org/2011/277>) | ||
1. Homomorphic Encryption for Arithmetic of Approximate Numbers (<https://eprint.iacr.org/2016/421>) | ||
1. A Full RNS Variant of Approximate Homomorphic Encryption (<https://eprint.iacr.org/2018/931>) | ||
1. Improved Bootstrapping for Approximate Homomorphic Encryption | ||
(<https://eprint.iacr.org/2018/1043>) | ||
8. Better Bootstrapping for Approximate Homomorphic Encryption (<https://eprint.iacr.org/2019/688>) | ||
9. Post-quantum key exchange - a new hope (<https://eprint.iacr.org/2015/1092>) | ||
10. Faster arithmetic for number-theoretic transforms (<https://arxiv.org/abs/1205.2926>) | ||
11. Speeding up the Number Theoretic Transform for Faster Ideal Lattice-Based Cryptography | ||
(<https://eprint.iacr.org/2016/504>) | ||
12. 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](http://reneefrench.blogspot.com/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.