concrete

Crates.ioconcrete
lib.rsconcrete
version0.2.1
sourcesrc
created_at2020-02-14 13:06:00.342152
updated_at2022-11-16 10:44:24.818532
descriptionConcrete is a fully homomorphic encryption (FHE) library that implements Zama's variant of TFHE.
homepagehttps://www.zama.ai/concrete-framework
repositoryhttps://github.com/zama-ai/concrete
max_upload_size
id208851
size259,746
Zama Bot (zama-bot)

documentation

https://docs.zama.ai/concrete/

README

Concrete Operates oN Ciphertexts Rapidly by Extending TfhE

concrete is a Rust crate (library) meant to abstract away the details of Fully Homomorphic Encryption (FHE) to enable non-cryptographers to build applications that use FHE.

FHE is a powerful cryptographic tool, which allows computation to be performed directly on encrypted data without needing to decrypt it first.

Example

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

Links

License

This software is distributed under the BSD-3-Clause-Clear license with an exemption that gives rights to use our patents for research, evaluation and prototyping purposes, as well as for your personal projects.

If you want to use Concrete in a commercial product however, you will need to purchase a separate commercial licence.

If you have any questions, please contact us at hello@zama.ai.

Commit count: 3085

cargo fmt