I am trying to convert a homomorphically encrypted integer to a homomorphically encrypted binary number (in vector form like {Ciphertext(1),Ciphertext(1),Ciphertext(0),Ciphertext(1)}), which I cannot really get the remainder (and any other "intermediate results") without decryption.

Is there really a way to do this?

  • $\begingroup$ That may depend on the FHE scheme that you are using. Generally, that is too way hard to do. Better way is to use binary in the beginning! $\endgroup$
    – kelalaka
    Commented Aug 10, 2020 at 14:38
  • 1
    $\begingroup$ FHE is by definition Turing Complete HE, so it's certainly possible there. But not all HE is FHE. $\endgroup$ Commented Aug 10, 2020 at 16:24
  • $\begingroup$ Which homomorphic scheme are using? How are you encrypting the messages? Simply one message per ciphertext or using some batching technique to encrypt several messages into one ciphertext? $\endgroup$ Commented Aug 11, 2020 at 6:28

1 Answer 1


The question could be change to "How to evaluate mod $N$ under FHE". For CKKS scheme, there exist approximations for that: https://eprint.iacr.org/2018/153.pdf


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.