You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to encrypt a vector of size 256134568 which is way larger than the Poly_modulus_degree (N) that Pyfhel accepts.
However, I tried to do it by dividing the vector into different chunks. But it isn't time efficient. Can you suggest any workaround or more efficient way to do it? In some papers, I've seen the brief mentions of Batch Enabling, does this relate to my concern? Can you provide me more context or how to enable batching or its usecase?
The text was updated successfully, but these errors were encountered:
Deepthiappasani
changed the title
How can I enable pyfhel on a vector of size greater than then 2**15? Does batch_enable helps?
How can I enable pyfhel on a vector of size greater than then 2**15? Does BatchEnabled helps?
Jun 6, 2023
Deepthiappasani
changed the title
How can I enable pyfhel on a vector of size greater than then 2**15? Does BatchEnabled helps?
How can I enable pyfhel on a vector of size greater than 2**15? Does BatchEnabled helps?
Jun 6, 2023
Pyfhel already uses "batch encoding" by default, that's why there's the ability to encrypt vectors in the first place.
Your vector size is not actually that large (roughly $2^{28}$). FHE can still be instantiated somewhat efficiently with $N = 2^{32}$. However, I'm not sure if the underlying libraries natively support that size (e.g., older versions of SEAL did not have pre-set parameters for this size).
Note, that the poly_modulus_degree needs to be a power of two, so maybe try it again with poly_modulus_degree = 2**31 ($N = 2^{32}$) and see if that's supported. Otherwise, I recommend you use two ciphertexts, each with poly_modulus_degree = 2**15 ($N = 2^{16}$). In fact, there's a good chance that the latter will be more efficient if you're computation doesn't need a lot of interaction between the two parts of the vector, as the overhead for larger $N$ grows faster than $N$ itself.
I was trying to encrypt a vector of size 256134568 which is way larger than the Poly_modulus_degree (N) that Pyfhel accepts.
However, I tried to do it by dividing the vector into different chunks. But it isn't time efficient. Can you suggest any workaround or more efficient way to do it? In some papers, I've seen the brief mentions of Batch Enabling, does this relate to my concern? Can you provide me more context or how to enable batching or its usecase?
The text was updated successfully, but these errors were encountered: