Debug
Since tfhe-rs 0.5, trivial ciphertexts have another application. They can be used to allow debugging via a debugger or print statements as well as speeding-up execution time so that you won't have to spend minutes waiting for execution to progress.
This can greatly improve the pace at which one develops FHE applications.
Keep in mind that trivial ciphertexts are not secure at all, thus an application released/deployed in production must never receive trivial ciphertext from a client.
Example
To use this feature, simply call your circuits/functions with trivially encrypted values (made using encrypt_trivial
) instead of real encryptions (made using encrypt
)
This example is going to print.
If any input to mul_all
is not a trivial ciphertexts, the computations would be done 100% in FHE, and the program would output:
Using trivial encryptions as input, the example runs in 980 ms on a standard 12 cores laptop, using real encryptions it would run in 7.5 seconds on a 128-core machine.
Last updated