Questions about the choice of tfhe-ntt parameters

Hi,

I am interested in using tfhe-ntt and tfhe-rs and would like to ask a few questions:

  1. (a) If I select the parameter sets Concrete_TFHE586 and Concrete_TFHE512 of the lattice-estimator, what are the corresponding parameters for tfhe-ntt?
    I think that n (the polynomial size) has to match Concrete_TFHE586 and Concrete_TFHE512 (i.e., 586 and 512), but how to choose the modulus q ?

    (b) In tfhe-ntt/examples/mul_poly_prime.rs, I found n=1024 and q=1073479681. Are these values recommended choices?

    (c) What is the relationship between the TFHE parameters and NTT parameters? Can the choice of NTT parameters affect the security of TFHE?

  2. Is there an example or tutorial demonstrating how to use tfhe-ntt together with tfhe-rs to perform homomorphic encryption?

Hello @Mr_Fx

Could you explain why you want to use the NTT?

Currently the best performing implementation we have is FFT based and we have parameters for it in the library.

Also id you have some code could you share what you are doing? Depending on what you want to do we have some APIs that may be better suited depending on the application.

Regards

Hi IceTDrinker,

thank you for your help.

I am just curious about the required NTT parameter sizes (N, Q) and I want to see a working example of a TFHE implementation that applies NTT for acceleration. I found the tfhe-rs project and saw a folder in the git called tfhe-ntt and assumed that one can use tfhe-rs with NTT instead of FFT. The performance is not important to me.

@Mr_Fx

There are parameters based on an NTT with Q = 2^64 - 2^32 + 1 (goldilocks prime)

however we do not make use of the NTT in higher level APIs in TFHE-rs on CPU today, you will need to take a look at the hpu mockup which makes use of the TFHE-rs low-level APIs to simulate how the HPU (homomorphic processing unit) processes data tfhe-rs/mockups/tfhe-hpu-mockup at 3c2cb273d5647a12ffa662ebca56264ca6b3ed0c · zama-ai/tfhe-rs · GitHub

example where the PBS with “back and forth” NTT is called in the mockup tfhe-rs/mockups/tfhe-hpu-mockup/src/lib.rs at 3c2cb273d5647a12ffa662ebca56264ca6b3ed0c · zama-ai/tfhe-rs · GitHub

Cheers