1
$\begingroup$

May I ask that does FHE supports modulus operation? That is, given $a$ in clear and $\mathtt{enc}(n)$, can I produce $\mathtt{enc}(a \bmod n)$?

I know that in theory it should be possible, since it supports NAND gate, then it should support any computation.

But for practice, does it support this mod operation?

$\endgroup$
2
  • $\begingroup$ Do you mean $a$ is in clear and $n$ is encrypted, so you want to map $(a, \mathtt{enc}(n))$ to $\mathtt{enc}(a \bmod n)$? $\endgroup$ Commented Oct 22 at 12:17
  • $\begingroup$ Yes! n is encrypted $\endgroup$
    – js wang
    Commented Oct 23 at 17:06

1 Answer 1

1
$\begingroup$

In practice this should be hard. Most methods I know of computing $a\bmod n$ are very similar to computing division $a/n$. Homomorphically computing division is hard, and last I checked there aren't any practically great methods.

It's possible that

  1. if you only have to do this once in a computation, or
  2. if $n$ is very small (think $\log n < 8$)

that you could get things to work practically. But if you're wondering if this is generally a "cheap" operation, I suspect the answer is no.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.