#fully #homomorphic #encryption #fhe #cryptography

concrete-commons

Common tools for the concrete FHE library

5 releases

Uses new Rust 2021

0.2.1 Jul 6, 2022
0.2.0 Apr 6, 2022
0.1.2 Feb 1, 2022
0.1.1 Sep 30, 2021
0.1.0 Jun 22, 2021

#149 in Cryptography

Download history 87/week @ 2022-06-05 85/week @ 2022-06-12 80/week @ 2022-06-19 97/week @ 2022-06-26 293/week @ 2022-07-03 82/week @ 2022-07-10 210/week @ 2022-07-17 123/week @ 2022-07-24 153/week @ 2022-07-31 469/week @ 2022-08-07 204/week @ 2022-08-14 210/week @ 2022-08-21 137/week @ 2022-08-28 143/week @ 2022-09-04 166/week @ 2022-09-11 103/week @ 2022-09-18

569 downloads per month
Used in 7 crates (5 directly)

BSD-3-Clause-Clear

39KB
733 lines

Concrete Commons

This crate contains types and traits to manipulate numeric types in a generic manner in the concrete-core library, you can find here in this repo. It also contains traits and structures to handle the computation of variance, standard deviation, etc.

Numeric types

For instance, in the standard library, the f32 and f64 trait share a lot of methods of the same name and same semantics. Still, it is not possible to use them generically. This module provides the [FloatingPoint] trait, implemented by both of those type, to remedy the situation. It also provides the [SignedInteger] and [UnsignedInteger] traits.

Note

The current implementation of those traits does not strive to be general, in the sense that not all the common methods of the same kind of types are exposed. Only were included the ones that are used in the rest of the library.

Dispersion

The dispersion module deals with noise distribution. When dealing with noise, we tend to use different representation for the same value. In general, the noise is specified by the standard deviation of a gaussian distribution, which is of the form $\sigma = 2^p$, with $p$ a negative integer. Depending on the use case though, we rely on different representations for this quantity:

  • $\sigma$ can be encoded in the [StandardDev] type.
  • $p$ can be encoded in the [LogStandardDev] type.
  • $\sigma^2$ can be encoded in the [Variance] type.

In any of those cases, the corresponding type implements the DispersionParameter trait, which makes if possible to use any of those representations generically when noise must be defined.

Key kinds

This module contains types to manage the different kinds of secret keys.

Parameters

This module contains structures that wrap unsigned integer parameters of concrete, like the ciphertext dimension or the polynomial degree.

License

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

Dependencies

~160KB