This document explains the basic steps of using the high-level API of TFHE-rs.
These are the steps to use the TFHE-rs high-level API:
Client-side: configure and generate keys
Client-side: encrypt data
Server-side: set the server key
Server-side: compute over encrypted data
Client-side: decrypt data
This example demonstrates the basic workflow combining the client and server parts:
The default configuration for x86 Unix machines is as follows:
Refer to the installation documentation for configuration options of different platforms.Learn more about homomorphic types features in the configuration documentation.
TFHE-rs uses traits
to implement consistent APIs and generic functions. To use traits
, they must be in scope.
The prelude
pattern provides a convenient way to globally import all important TFHE-rs traits at once. This approach saves time and avoids confusion.