Questions regarding TFHE-rs, concrete

Hi all,

  1. May I know if there is circuit based function evaluation, for instance like in paper, where you have input encoded as bits in TRLWE ciphertext (with packing), then MUX gate act on ciphertext and cascade to form any function \mathbb{B}^n\rightarrow \mathbb{B}^m? I only see function evaluation by gate bootstrapping in TFHE-rs. This is required for efficient evaluation of function over large integers (e.g. 16 bits).

  2. May I know if there is a way to convert integer ciphertext to vector of boolean ones by extracting each bit? If so, how is the complexity?

  3. Is it true that there is absolutely no packing involved in boolean (i.e. LWE) and using logic gates is quite slow? I am not sure if I missed something :rofl: one bool MUX takes ~50ms on my single thread R9-6950HS, even with rust optimization and release mode!

Your help would be greatly appreciated!

Hello @fivetissimo repeating the answers from Discord here for visibility :slightly_smiling_face:

  1. At the moment the Boolean API is not using the TRLWE packing as far as Iā€™m aware
  2. There is no way at the moment to get a tfhe::boolean vector from a tfhe::integer, there is a method to evaluate a Look-up table on an integer however called wopbs which uses bit extraction
  3. I think you corrected your timing on discord and gave 10ms which sounds reasonable.

For better performance on an avx512 enabled machine you could run something like:

RUSTFLAGS="-C target-cpu=native" cargo +nightly run --release --features=nightly-avx512,boolean,x86_64

Cheers!

2 Likes