Concrete Operates oN Ciphertexts Rapidly by Extending TfhE
Concrete is a fully homomorphic encryption (FHE) library that implements Zama's variant of TFHE. Concrete is based on the Learning With Errors (LWE) problem and on the Ring Learning With Errors (RLWE) problem, which are well studied cryptographic hardness assumptions believed to be secure even against quantum computers.
To use Concrete, you must install Rust, FFTW and add concrete to the list of dependencies.
Rust installation
To install rust on Linux or Macos, you can do the following:
|
If you want other rust installation methods, please refer to rust website.
FFTW and openssl installation
You also need to install FFTW and openssl library.
MacOS
The more straightforward way to install fftw is to use Homebrew Formulae. To install homebrew, you can do the following:
And then install FFTW and openssl.
Linux
To install FFTW on a debian-based distribution, you can do the following:
&&
From source
If you want to install FFTW directly from source, you can follow the steps described in FFTW's website.
Use concrete
in your own project
You need to add the Concrete library as a dependency in your Rust project.
To do so, simply add the dependency in the Cargo.toml
file.
Here is a simple example:
[]
= "play_with_fhe"
= "0.1.0"
= ["FHE Curious"]
= "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[]
= "0.1.0"
Now, you can compile your project with the cargo build
command, which will fetch the Concrete library.
It is also possible to build the library from source by cloning this repository and running:
Tests
To run the tests, you can do the following
Example
use *;
use ProAPIError;
Credits
This library uses several dependencies and we would like to thank the contributors of those libraries :
-
FFTW (rust wrapper) : Toshiki Teramura (GPLv3)
-
FFTW (lib) : M. Frigo and S. G. Johnson (GPLv3)
-
kolmogorov_smirnov: D. O. Crualaoich (Apache 2.0)
-
openssl (rust wrapper): S. Fackler (Apache-2.0)
-
openssl (lib):
-
serde: E. Tryzelaar and D. Tolnay (MIT or Apache 2.0)
-
colored: T. Wickham (MPL-2.0)
We also use some crates published by The Rust Project Developers
under the MIT or Apache 2.0 license :
License
This software is distributed under the AGPL-v3 license. If you have any question, please contact us at hello@zama.ai.