concrete

Concrete: TFHE Compiler that converts python programs into FHE equivalent

OTHER License

Downloads
5K
Stars
1.1K
Committers
46

Bot releases are hidden (Show)

concrete - Concrete V0.1.10

Published by aPere3 about 3 years ago

This release changes the license for a BSD-3-Clause-Clear one.

concrete - Concrete Commons V0.1.1

Published by aPere3 about 3 years ago

This release brings the following changes:

  • The license was changed for a BSD-3-Clause-Clear
  • Types internal to concrete-core were promoted to the commons:
    • PlaintextCount
    • CleartextCount
    • CiphertextCount
    • LweSize
    • LweDimension
    • GlweSize
    • GlweDimension
    • PolynomialSize
    • PolynomialCount
    • DecompositionBaseLog
    • DecompositionLevelCount
  • The KeyKind types were promoted from concrete-core to concrete-commons.
concrete - Concrete Csprng V0.1.8

Published by aPere3 about 3 years ago

The following changes were brought:

  • The license was changed for a BSD-3-Clause-Clear
concrete - Concrete Npe V0.1.9

Published by aPere3 about 3 years ago

The following changes were brought:

  • The license was changed for a BSD-3-Clause-Clear
concrete - Concrete Core V0.1.10

Published by aPere3 about 3 years ago

The following changes were brought:

  • The license was changed for a BSD-3-Clause-Clear

  • The bootstrap module was completely refactored, in order to make bootstrapping keys easier to use, and the code simpler to understand.

  • The decomposition module was completely refactored, to introduce new iterators types, making it simpler to use the signed decomposition.

  • The GlweSecretKey and LweSecretKey can now be of different kinds: Binary, Ternary, Gaussian and Uniform. Those kinds are represented by empty types all implementing the same marker trait KeyKind, which is included in the signature of the secret keys.

  • A new random generator, the SecretRandomGenerator, was introduced, which must be explicitly passed to the functions generating secret keys.

  • The fftw support was modified (through the use of the concrete-fftw wrapper) to compile faster kernels. On the downside, this means that you need to have libclang installed for the library to compile.

  • The key kinds and some internal types have been moved to concrete-commons, and the imports have been updated. Moved types: PlaintextCount, CleartextCount, CiphertextCount, LweSize, LweDimension, GlweSize, GlweDimension, PolynomialSize, PolynomialCount, DecompositionBaseLog, DecompositionLevelCount

  • The GlweCiphertext type now features an entrypoint to perform a sample extract of any of its coefficients.

  • The GswCiphertext type was added.

  • A fix is introduced to reduce the noise in the FFT: the bootstrapping key is cast to a signed Integer before the conversion to f64, which centers the noise and helps reduce it by up to 5 bits.

concrete - Concrete Commons V0.1.0

Published by aPere3 over 3 years ago

This package contains all the common structures used throughout the concrete ecosystem.

concrete - Concrete Npe V0.1.8

Published by aPere3 over 3 years ago

concrete - Concrete Csprng V0.1.7

Published by aPere3 over 3 years ago

This release brings the following features:

  • The ability to fork a prng into a set of child generators with bounded generation capacity.
  • The ability to perform this fork in a rayon friendly manner
concrete - Concrete Core V0.1.9

Published by aPere3 over 3 years ago

This new versions brings several new features among which:

  • the ability to explicitly pass the prng when needed
  • the ability to generate the bootstrap key in multithread.
concrete - Concrete V0.1.9

Published by aPere3 over 3 years ago

This release synchronizes the concrete crate with the last improvements brought to the other ecosystem changes.

concrete - Concrete V0.1.8

Published by aPere3 over 3 years ago

Fix:

  • Propagate the fix to concrete-npe signaled in #9 and fixed in version 0.1.7 of concrete-npe
  • Fixes the bug related to delta approximate equality also signaled in #9
concrete - Concrete Core V0.1.8

Published by aPere3 over 3 years ago

Fix:

  • Propagate the fix to concrete-npe signaled in #9 and fixed in version 0.1.7 of concrete-npe
concrete - Concrete Npe V0.1.7

Published by aPere3 over 3 years ago

Fix

  • A bug in the noise formula of the keyswitch (#9)
concrete - Concrete 0.1.7

Published by aPere3 over 3 years ago

Concrete 0.1.7

This new release of concrete brings several changes to the architecture of the library, and some performance improvements.

Concrete Ecosystem

Concrete used to be a single monolithic crate. We choose to adopt a more modular approach to deliver releases at a faster pace and to make external contributions easier. The library is now separated in different crates:

  • concrete now contains what was previously the concrete::crypto_api module, a high-level FHE library which provides easy-to-use FHE operators.
  • concrete-core contains what was previously the concrete::core_api module, a low-level FHE library, which allows the user to have maximal performance in its FHE application.
  • concrete-npe contains what was previously the concrete::npe module, a noise propagation estimator to track the evolution of noise through FHE operations.
  • concrete-csprng contains a new implementation of a Cryptographically Secure PRNG.

Concrete-core refactoring

The concrete-core crate went through a large refactoring, with the goal of making it more approachable to new contributors. This part of the library is meant to give the fastest FHE operators possible on a CPU. We previously took the approach of implementing those in a very raw manner, with the goal of avoiding all unnecessary costs. With this refactoring, we were able to create abstractions that make the code simpler to discover, understand and play with, while keeping the same performance profile as before.

CSPRNG

We used to rely on openssl to generate random numbers, which had two drawbacks. First this was a non-rust dependency which made the crate harder to install. Plus, the rust wrapper did not allow to pick the PRNG algorithm of our choice.

We implemented a CSPRNG based on a stream cipher defined in the ISO/IEC 18033-4 standard. We choose the scheme relying on the AES blockcipher in CTR mode to have a fast and parallel friendly random number generation. The current implementation makes use of the aesni instruction set, available on all modern Intel hardwares. Our benchmarks showed a 3 fold improvement in the speed of random number generation.

Bootstrap performance improvement

We used to use the izip! macro of itertools a lot, but it proved to be a big optimization blocker for the compiler. Removing it brought a performance bump on the bootstrap, ranging from 10 to 70% depending on the size of the ciphertext and decomposition.

What’s next ?

For the upcoming releases, we will keep working on improving the library structure. A new crate should appear in the ecosystem, which will bring an enhanced management of the encodings. The genericity of concrete will be strengthened to allow integers of different precisions. We will also work on improving the naming and the documentation of the concrete crate as well as the concrete-core crate. Finally, we will try to come up with an generic implementation of the csprng, that could be used on hardware that do not support the aesni instruction set.

Links

https://crates.io/crates/concrete
https://crates.io/crates/concrete-core
https://crates.io/crates/concrete-csprng
https://crates.io/crates/concrete-npe