8个版本
0.3.0 | 2022年10月19日 |
---|---|
0.2.2 | 2022年7月6日 |
0.2.1 | 2022年4月6日 |
0.2.0 | 2022年2月1日 |
0.1.6 | 2021年3月25日 |
#2212 in 密码学
37 每月下载量
用于 concrete-core-experimenta…
4MB
63K SLoC
Concrete噪声传播估计器
本包包含用于估计密文中的噪声传播的工具,用于在concrete-core库中定义的同态算子,你可以在本仓库中找到它 这里。
链接
许可证
本软件在BSD-3-Clause-Clear许可证下分发。如有任何疑问,请通过 hello@zama.ai
联系我们。
lib.rs
:
欢迎使用 concrete-npe
文档!
描述
该库使得在执行同态操作后估计噪声传播成为可能。它使得能够获取噪声输出分布的特性,我们称之为 分散度,它包括了方差和期望。这在追踪电路的同态评估过程中的噪声增长时特别有用。这些公式的解释和证明可以在文章 Improved Programmable Bootstrapping with Larger Precision and Efficient Arithmetic Circuits for TFHE 的附录中找到,作者为 Ilaria Chillotti, Damien Ligier, Jean-Baptiste Orfila 和 Samuel Tap。
快速示例
以下代码片段展示了如何获得两个具有方差 $\sigma_{ct_1}$ 和 $\sigma_{ct_2}$ 的密文之间模拟同态加法后的噪声方差 $\sigma_{add}$。
示例
use concrete_core::prelude::{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::<_, _>(var1, var2, 64);
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);