Code Monkey home page Code Monkey logo

concrete's Introduction

Warning

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.

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 [email protected]. (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 [email protected].

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.

concrete's People

Contributors

tmontaigu avatar apere3 avatar agnesleroy avatar orelcosseron avatar aquint-zama avatar blowfish880 avatar jborfila avatar damienligier avatar zama-bot avatar sarah-ek avatar loris-b avatar rudy-6-4 avatar soonum avatar bourgeriequentin avatar vthib avatar icetdrinker avatar bencrts avatar florentclmichel avatar optalysys-lab avatar jeremycbradley avatar anas-b avatar zaccherinij avatar samcrx avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.