Concrete-core v1.0.0-alpha

February 9, 2022
  -  
The Zama Team

Introducing support for FHE hardware accelerators

In March 2021, we released the beta version of Concrete-core, the low-level crypto library that powers the Concrete Framework we build at Zama. This first implementation was focused on CPUs, which was just the beginning: at Zama, we believe that hardware acceleration is the cornerstone of the FHE revolution. Since then, we have been working hard to release an architecture that would make Concrete-core the perfect platform to experiment and integrate new FHE-related hardware-acceleration.

Today, it is our pleasure to deliver the release-candidate of the 1.0.0 version of Concrete-core, including a completely refreshed architecture. It is now easier than ever to accelerate any of the already existing FHE operators. By accelerating Concrete-core, you are accelerating the entire suite of applications built with the Concrete Framework, including our recently released Concrete-numpy library (check out our blog post here).

Our latest CPU-based implementation is included in this new version of Concrete-core, and we plan to add more backends in the near future, for example using GPUs and FPGAs. We’re confident that this new version will be a useful tool for both hardware developers and cryptographers, and will ultimately bring FHE to a larger audience!

Paving the way for seamless hardware contributions

Our main goal here was to make it as simple as possible to plug hardware specific implementations into Concrete-core. The Rust programming language and its Trait system prove to be a great help for what we were looking to achieve.

We decided to implement a specification module which contains a set of interacting Traits, that completely define the FHE scheme implemented in Concrete-core:

You can think of this module as a blueprint explaining all the interfaces of the Concrete scheme. So instead of being a written document, it is actual Rust code, which can be used to check the compliance of an implementation at compile-time. You can see that this specification contains two kinds of traits:

  • Entities, which represent data types used in the framework (in green)
  • Engines, which represent operators acting on entities (in orange)

The specification is full of entities and engines, and you can have a look here to see all the data types and all the operations currently supported.

So, how will this help to accelerate FHE? Next to this specification module, we have a backend module, which currently contains a core submodule:

That is our current implementation of concrete-core. It provides multiple objects that follow the pattern described in the specification module. As such, we have:

  • Multiple entities which are actual FHE data types, each implementing one *Entity trait
  • One engine, which implement many of the *Engine traits present in the specification

As a hardware designer, to accelerate an entry point in Concrete-core, all you have to do is to create a new module in this backend folder, which implements the part of the specification you are interested in. The point of the specification design is that you do not need to rely on us to create a new backend. You can work your implementation at your own pace, while relying on the Rust compiler to verify that your logic follows the specification at every step.

Simplifying the benchmarking of new accelerations

An important step in the process of integrating a new acceleration with Concrete-core, is to verify that performances meet expectations. To make it fast to benchmark a new backend, we introduce a generic benchmarking facility that makes it a breeze to benchmark your implementation. Indeed, having this abstract specification module makes it possible to develop a generic benchmark harness:

This Concrete-benchmark application (already available in the repository) makes it possible to benchmark the operators you implemented in a matter of minutes. You just need to instantiate the bits of the generic benchmarking harness that your implementation covers. Even better, thanks to the generic nature of this benchmark, it is easy to compare with the existing implementation, and the ones that will be added later on.

In the same spirit, we are about to bring a comparable smoothness to verify the correctness of the operators. The Concrete-test application we’re currently working on will bring a set of generic tests that can be instantiated within minutes to verify the correctness of your implementation.

Fast verification and benchmarking of your accelerations will greatly reduce the hardships of accelerating FHE, and will help the community get up to speed to make homomorphic encryption more mainstream.

Summing Up

With this release candidate of the 1.0.0 version of Concrete-core, we’re bringing you a new architecture that allows fast integration of hardware accelerations.

We reworked the entire architecture of the library, to make it as simple as possible for hardware designers to integrate with the library. We also delivered a generic benchmark application which makes it possible to quickly compare the performance of your implementation with the other existing ones.

We hope that this will help Concrete-core to become the hub where compiler makers, library writers, and hardware designers meet to build the future of FHE. If you believe in this vision, and want to contribute, check out our tutorials and start a pull request!

Get the latest news about homomorphic encryption and what we do at Zama: subscribe to our newsletter.

We are hiring! Join Zama and help us safeguard privacy by making the internet encrypted end-to-end. All the info here: jobs.zama.ai

We’re open source — follow Zama on Github here: github.com/zama-ai

Read more related posts

What’s new in Concrete v0.1.10

Support for homomorphic boolean gates, new open source license, and more!

Read Article

Announcing Concrete Numpy

Zama are very excited to announce our release of Concrete Numpy as a public beta.

Read Article