snucrypto / HEAAN

Other
359 stars 94 forks source link

How to fix the digits above the decimal point #10

Closed Luidy closed 2 years ago

Luidy commented 6 years ago

Hello. I found that using the HEAAN library, multiplying too large a number by 0(zero) would not result in 0. So I wanna fix the number of digits above the decimal point so that it does not get larger than a certain number.

For example, If I set the number of digits above the decimal point to 3, I wanna make it not bigger than the number of three digits(The number of hundreds.).

I'll wait for your answer. Thank you.

kimandrik commented 6 years ago

Hello.

You mean you want to make a threshold for the output right? For example if a = 40 then a^2 = 1600, but you want to result only 600?

Luidy commented 6 years ago

yes right.

kimandrik commented 6 years ago

I'm not sure how to do this threshold feature in the encrypted state, do you have a good idea how to implement it?