From 0b4ddb53ae236e0cf1740f80036ae9a30a091093 Mon Sep 17 00:00:00 2001 From: Samuel Tap Date: Thu, 23 Jun 2022 18:07:54 +0200 Subject: [PATCH] doc: adding a readme for v0-parameters tool --- v0-parameters/README.md | 68 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 v0-parameters/README.md diff --git a/v0-parameters/README.md b/v0-parameters/README.md new file mode 100644 index 000000000..6a4537eec --- /dev/null +++ b/v0-parameters/README.md @@ -0,0 +1,68 @@ +# v0 Parameters + +The `v0-parameters` tool provides crypto-parameters that guarantee security, correctness and fast +computation without prior knowledge of the crypto-parameter optimization. + +It can also be used to explore the crypto-parameter space w.r.t. the 2-norm of the dot product, the +precision or even the failure probability. + +For now, we only support two kind of atomic patterns but more will be added in the near future. + +## Supported Atomic Patterns + +### Default Atomic Pattern + +The default atomic pattern is composed of a dot product between ciphertexts and integer weights, an +LWE-to-LWE keyswitch and a PBS i.e. + +
DotProduct(v) ➜ KS ➜ PBS
+ +This atomic pattern allows to compute over encrypted data a dot product and a lookup-table +evaluation for precision between 1 and 8 (with the default failure probability) and 2-norm between +2^0 and 2^25. The 2-norm is defined as the 2-norm v of the weights of the Dot Product. It is used as +a metric to quantify the impact of the leveled operations between two PBS on the noise (here a +DotProduct). Note that an atomic pattern can be described by its precision and 2-norm but only in +the case that every inputs are independents from one another (regarding the noise). + +### New Atomic Pattern + +Another atomic pattern is available leveraging the new WoP-PBS (Without-Padding Programmable +Bootstrapping) described in this [paper](https://eprint.iacr.org/2022/704.pdf). It is composed of a +dot product between ciphertexts and integer weights and a WoP-PBS. + +
DotProduct(v) ➜ WoP-PBS
+ +Using this new AP, we can find parameters for precision up to 16 bits 🥳 using the optional flag ` +--wop-pbs` like that + +```bash +cargo run --release -- --wop-pbs +``` + +## Usage + +The `v0-parameters` tool can take several parameters as arguments. The summary of all available +arguments is accessible by running in the `v0-parameters/` folder + +```bash +cargo run --release -- --help +``` + +By default, the optimization is done on the default AP (DotProduct -> Ks -> PBS) for every available +precision and for every 2-norm. If not specified, the correctness of the computation is guaranteed +up to a failure probability of 2^-13.9. This can be changed using the `--p-error` +optional argument. + +Try running `cargo run --release`, you will get the V0 Parameters Table that was previously used +in `concrete-compiler`. + +## Advanced Usage + +It is possible to choose the search space for each cryptographic parameters. For example, here we +constrain the glwe dimension to be equal to 1: + +```bash +cargo run --release -- --max-glwe-dim 1 +``` + +