Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information.
Latest commit message
Commit time
August 11, 2021 13:05
December 1, 2022 09:32


Concrete repository is about to transition from our original TFHE library to our TFHE compiler. For those seeking a TFHE library in Rust, we recommend switching to TFHE-rs.

The concrete ecosystem is a set of crates that implements Zama's variant of TFHE. In a nutshell, fully homomorphic encryption (FHE), allows you to perform computations over encrypted data, allowing you to implement Zero Trust services.

Concrete is based on the Learning With Errors (LWE) and the Ring Learning With Errors (RLWE) problems, which are well studied cryptographic hardness assumptions believed to be secure even against quantum computers.


Concrete crates

Concrete is implemented using the Rust Programming language, which allows very fast, yet very secure implementations.

The ecosystem is composed of several crates (packages in the Rust language). The crates are split into 2 repositories:

  • The concrete repository which contains crates intended to be more approachable by non-cryptographers.
  • The concrete-core repository which contains the crates implementing the low level cryptographic primitives.

The crates within this repository are:

  • concrete: A high-level library, useful to cryptographers that want to quickly implement homomorphic applications, without having to understand the details of the jmplementation.
  • concrete-boolean: A high-level library, implementing homomorphic Boolean gates, making it easy to run any kind of circuits over encrypted data.
  • concrete-shortint: A high-level library, implementing operations on short integers (about 1 to 4 bits).
  • concrete-integer: A high-level library, implementing operations on integers, construction on top of short integers for values in about 4 to 16 bits.


As concrete relies on concrete-core, concrete is only supported on x86_64 Linux and x86_64 macOS. Windows users can use concrete through the WSL. For Installation instructions see or documentation.

Getting Started

Here is a simple example of an encrypted addition between two encrypted 8-bit variables. For more information please read the documentation.

use concrete::{ConfigBuilder, generate_keys, set_server_key, FheUint8};
use concrete::prelude::*;

fn main() {
    let config = ConfigBuilder::all_disabled()

    let (client_key, server_key) = generate_keys(config);


    let clear_a = 27u8;
    let clear_b = 128u8;

    let a = FheUint8::encrypt(clear_a, &client_key);
    let b = FheUint8::encrypt(clear_b, &client_key);

    let result = a + b;

    let decrypted_result: u8 = result.decrypt(&client_key);

    let clear_result = clear_a + clear_b;

    assert_eq!(decrypted_result, clear_result);


There are two ways to contribute to Concrete:

  • you can open issues to report bugs or typos and to suggest new ideas
  • you can ask to become an official contributor by emailing (becoming an approved contributor involves signing our Contributor License Agreement (CLA))

Only approved contributors can send pull requests, so please make sure to get in touch before you do!

Citing Concrete

To cite Concrete in academic papers, please use the following entry:

  title={CONCRETE: Concrete Operates oN Ciphertexts Rapidly by Extending TfhE},
  author={Chillotti, Ilaria and Joye, Marc and Ligier, Damien and Orfila, Jean-Baptiste and Tap, Samuel},
  booktitle={WAHC 2020--8th Workshop on Encrypted Computing \& Applied Homomorphic Cryptography},


This library uses several dependencies and we would like to thank the contributors of those libraries.

We thank Daniel May for supporting this project and donating the concrete crate.


This software is distributed under the BSD-3-Clause-Clear license. If you have any questions, please contact us at


Security Estimation

Security estimation, in this repository, used to be based on the LWE Estimator, with reduction_cost_model = BKZ.sieve. We are currently moving to the Lattice Estimator with red_cost_model = reduction.RC.BDGL16.

When a new update is published in the Lattice Estimator, we update parameters accordingly.

Side-Channel Attacks

Mitigation for side channel attacks have not yet been implemented in Concrete, and will be released in upcoming versions.