Getting started
Concrete is a fully homomorphic encryption (FHE) library that implements Zama's variant of TFHE. TFHE is based on Learning With Errors (LWE), a well studied cryptographic primitive believed to be secure even against quantum computers.
Concrete is currently released in alpha. The API is not stable and likely to change short term.
Concrete is an open source library. The code is available on Github.
In cryptography, a raw value is called a message (also sometimes called a cleartext), an encoded message is called a plaintext and an encrypted plaintext is called a ciphertext.
The idea of homomorphic encryption is that you can compute on ciphertexts while not knowing messages encrypted in them. A scheme is said to be fully homomorphic, meaning any program can be evaluated with it, if at least two of the following operations are supported (is a plaintext and is the corresponding ciphertext):
homomorphic univariate function evaluation:
homomorphic addition:
homomorphic multiplication:
Zama's variant of TFHE is fully homomorphic and deals with approximate real numbers () as messages. It implements homomorphic addition and function evaluation via Programmable Bootstrapping. You can read more about Zama's TFHE variant in the preliminary whitepaper.
Using FHE in a Rust program with Concrete consists in:
generating a secret key using secure parameters
encoding input messages into fixed-precision plaintexts
encrypting plaintexts using the secret key to produce ciphertexts
operating homomorphically on ciphertexts
decrypting the resulting ciphertexts into plaintexts using the secret key
decoding plaintexts to get the final output messages
Here is an example program that adds two ciphertexts:
Concrete being a library, all functions are wrapped in a Result
to let you manage errors the way you see fit for your program.
This guide will walk you through using the Concrete library to build homomorphic programs, explaining the underlying key concepts as they are encountered.
Last updated