I want to do a hardware implementation of the BFV scheme, but the thing I couldn’t understand is how to find the multiplication depth or the number of multiplications my scheme can perform before the computation fails to give the correct answer with the chosen n = 8192, q = 2^383-2^33+1, t1 = 1099511922689, and t2 = 1099512004609 parameters of the BFV scheme. These are cryptonet parameters, and how can I, in general, find the multiplication depth with respect to the chosen parameter in the BFV scheme before the decryption failure occurs?
Is there any specific documentation or formula that may help in understanding this? Please suggest that too
Check Section 3.1 in this work, it describes how you can estimate the noise growth after homomorphic addition and homomorphic multiplication in BFV. The basic idea is to estimate the noise after one multiplication and project that noise to L sequential multiplications. This ensures that the total noise is less than the threshold noise that breaks decryption.
In OpenFHE, you can specify the multiplicative depth according to your application requirements. OpenFHE will then select the appropriate parameters that achieve the provided security level.
Check this simple example in OpenFHE, which shows how to use BFV.
If you are using a different library, you can find the multiplicative depth experimentally as follows:
run an experiment (for loop with a sequence of multiplications) and check when decryption fails.
Thanks for the reference, I will read it and let you know if there are any further questions i have. In the meantime, you can tell me whether I can set these parameters( n = 8192, q = 2^383-2^33+1, t1 = 1099511922689, and t2 = 1099512004609) in openFHE and find the multiplication depth using the BFV contextGen function or not.
I’ll just step in and say that it might be beneficial for you to play with the library both to get a feel for how things work in OpenFHE, and to answer your own questions. I found it immensely beneficial to first learn PALISADE (OpenFHE’s precursor) by playing with the library and reading through the examples.
but i am not much focused on the software implementation of it, If you can suggest a way to find this information, i would probably move on with my hardware implementation.
In the meantime, you can tell me whether I can set these parameters( n = 8192, q = 2^383-2^33+1, t1 = 1099511922689, and t2 = 1099512004609) in openFHE and find the multiplication depth using the BFV contextGen function or not.
Not directly. The relevant OpenFHE code is in https://github.com/openfheorg/openfhe-development/blob/v1.0.4/src/pke/lib/scheme/bfvrns/bfvrns-parametergeneration.cpp You can change the lambda function logqBFV
for multiplicativeDepth > 0 to take the depth as an argument and run a loop for it. Basically you could take the code and change it for your needs.