#fully #homomorphic #encryption #fhe #cryptography


Noise parameter estimator for the concrete FHE library

7 releases

Uses new Rust 2021

0.2.2 Jul 6, 2022
0.2.1 Apr 6, 2022
0.2.0 Feb 1, 2022
0.1.9 Sep 30, 2021
0.1.6 Mar 25, 2021

#866 in Cryptography

Download history 58/week @ 2022-06-15 73/week @ 2022-06-22 45/week @ 2022-06-29 82/week @ 2022-07-06 47/week @ 2022-07-13 46/week @ 2022-07-20 39/week @ 2022-07-27 64/week @ 2022-08-03 55/week @ 2022-08-10 39/week @ 2022-08-17 60/week @ 2022-08-24 71/week @ 2022-08-31 102/week @ 2022-09-07 100/week @ 2022-09-14 44/week @ 2022-09-21 43/week @ 2022-09-28

306 downloads per month
Used in 3 crates


1.5K SLoC

Concrete Noise Propagation Estimator

This crate contains tools to estimate the propagation of noise in ciphertexts, for the homomorphic operators defined in the concrete-core library, you can find it here in this repo.


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


Welcome the the concrete-npe documentation!


This library makes it possible to estimate the noise propagation after homomorphic operations. It makes it possible to obtain characteristics of the output distribution of the noise, that we call dispersion, which regroups the variance and expectation. This is particularly useful to track the noise growth during the homomorphic evaluation of a circuit. The explanations and the proofs of these formula can be found in the appendices of the article Improved Programmable Bootstrapping with Larger Precision and Efficient Arithmetic Circuits for TFHE by Ilaria Chillotti, Damien Ligier, Jean-Baptiste Orfila and Samuel Tap.

Quick Example

The following piece of code shows how to obtain the variance $\sigma_{add}$ of the noise after a simulated homomorphic addition between two ciphertexts which have variances $\sigma_{ct_1}$ and $\sigma_{ct_2}$, respectively.


use concrete_commons::dispersion::{DispersionParameter, Variance};
use concrete_npe::estimate_addition_noise;
//We suppose that the two ciphertexts have the same variance.
let var1 = Variance(2_f64.powf(-25.));
let var2 = Variance(2_f64.powf(-25.));

//We call the npe to estimate characteristics of the noise after an addition
//between these two variances.
//Here, we assume that ciphertexts are encoded over 64 bits.
let var_out = estimate_addition_noise::<u64, _, _>(var1, var2);
println!("Expect Variance (2^24) =  {}", 2_f64.powi(-24));
println!("Output Variance {}", var_out.get_variance());
assert!((2_f64.powi(-24) - var_out.get_variance()).abs() < 0.0001);