Modules are still experimental. They are only compatible with composition, which means the outputs of every functions can be used directly as inputs for other functions. The crypto-parameters used in this mode are large and thus, the execution is likely to slow.
In some cases, deploying a server that can execute different functions is useful. Concrete can compile FHE modules, that can contain many different functions to execute at once. All the functions are compiled in a single step and can be deployed with the same artifacts. Here is an example:
You can compile the FHE module MyModule
using the compile
method. To do that, you need to provide a dictionnary of input sets for every function:
Note that here we can see a current limitation of modules: The configuration must use the parameter_selection_strategy
of v0
, and activate the composable
flag.
After the module has been compiled, we can encrypt and call the different functions in the following way: