xueyumusic / concrete

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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

Links

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.

Installation

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 Install.md 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()
        .enable_default_uint8()
        .build();

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

    set_server_key(server_key);

    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);
}

Contributing

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 hello@zama.ai. (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:

@inproceedings{WAHC:CJLOT20,
  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},
  volume={15},
  year={2020}
}

Credits

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.

License

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

Disclaimers

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.

About

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.

License:Other


Languages

Language:Rust 99.0%Language:HTML 0.4%Language:Python 0.3%Language:Shell 0.2%Language:Batchfile 0.1%Language:Makefile 0.1%