HElib icon indicating copy to clipboard operation
HElib copied to clipboard

How can I improve the accuracy of my data? help!

Open Ldisi opened this issue 7 years ago • 2 comments

I've been using HElib for a while,However, I was stumped by the difficulty of data accuracy. I mean , Helib allows to encrypt positive integer only, but we may need the decimal part in practice. My first thought is to scale the encrypted data with a number , maybe 1000 or bigger . Unfortunately, with the augment of data ,I have to increase p ,which leads to smaller L (Number of multiplication) .The logic is that : decimal -> scale data -> lager p -> smaller L . Do you have any good Suggestions for my problems? Maybe you also have insights in division. Happy for advice from everyone!

Ldisi avatar Nov 13 '18 15:11 Ldisi

I've got the same problem as yours?Could I ask you some questions? How do I expand the modulus?(if the size of modulus is limit to the precision of long?)

justtWu avatar Dec 10 '18 05:12 justtWu

  • Try using multiple co-prime t, say K > 1 co-prime t.
  • And encrypt you data with these K keys.
  • Perform the computation parallel, on the K copies of ciphertexts.
  • Reconstruct you result from K results using the CRT.

fionser avatar Dec 10 '18 06:12 fionser