I want to know what can I do(arithmetic operations) with the schemes!

I’m wondered about what arithmetic operations are supported from FHE.

I want to know for 2nd Gen(BGV,BFV), 3rd GEN(GSW,CGGI), 4th GEN(CKKS)!

And I really want to know detail operations!
(ex. 2nd Gen support +,-,*,/)

  • Is 3rd can support more than and/or/not? I heard it is for a bit.

Thanks for reading :slight_smile:

1 Like

Hi there!

They all support +, -, *. They do not support divisions.

You can see examples of those operations in action for CKKS, BGV and BFV in our PKE Examples directory and you can find examples for “third gen” in BINFHE Examples

I also suggest watching the webinars in the PALISADE/OpenFHE tutorial: Webinars – OpenFHE.org, starting with Homomorphic Encryption for OpenFHE Users – OpenFHE.org I also suggest watching other tutorials in the series, including integer arithmetic and approximate arithmetic.

Note about divisions:

  • Scalar divisions are supported in CKKS if we write the division as a double representing 1/number and then multiply by it using EvalMult.
  • Homomorphic division can be performed in FHEW/TFHE (3rd Gen) by building a Boolean circuit for 1/encrypted_number and evaluating it (see Homomorphic Encryption for OpenFHE Users – OpenFHE.org for more details).

I’m really thanks and sorry guys!

Because I’m not a programmar, I want to get easier and clear answer if you can!

  1. What operations are supported for FHEs in each Gen? (+,-,poly-multi, …)

  2. 3rd Gen support only for a bit? or they can support more bits with carry or else?

Thanks again guys!!

@Higuys

Can I know your background and usecase? E.g are you a programmer, mathematician, have you taken discrete math classes, etc. I hope I’m not coming across as condescending, but it sounds like you’re not the usual audience we have, so I’m trying to get an idea of how we can best help.

But anyways, to answer your question

BGV && BFV: supports +, *, - across ciphertexts

FHEW/TFHE supports +, *, - and homomorphic division (as Yuriy mentioned)

CKKS: supports +, *, - across ciphertexts. As Yuriy mentioned, division can be done by doing it in the clear and then multiplying that with the ciphertext. But you can’t divide two ciphertexts directly

poly-multi

Do you mean polynomial multiplication or polynomial evaluation? Polynomial multiplication is what we do on all of them but only CKKS supports polynomial evaluation. For FHEW (and I think TFHE, but I’ll defer to Yuriy) you can construct lookup tables for functions that you can evaluate a value on.


3rd Gen support only for a bit? or they can support more bits with carry or else?

In OpenFHE you can operate on actual numbers, not just bits. So yes, you can work on more than a single bit.


HTH!

Thanks for your attention.

I studied cryptography :slight_smile:

I heard that 3rd targeted a bit arithmetic and only 8~16 bits are supported in recent.

Is this right? and in a large integer, 2nd are more efficient than 3rd?

I want to know pros and cons in arithmetics in generations! (ex. CKKS only support approximate arithmetic)

Hi
maybe this will help. Note that typically TFHE/FHEW are used for boolean arithmetic, but we recently extened it to small integers (not shown in the picture)

Hi!

Since you’ve mentioned division, is there any chance I can do a ciphertext divide a plaintext?
i.e. Given (a(x)s(x)+e(x),a(x)) and a’(x), where a’(x) is some function of a(x) [e.g.: automorphism, or square function], can i compute (a’s+e’, a’)?
(I think e’(x) is okay not to satisfy the gaussian distribution, but shouldn’t be too large to destroy a ciphertext.
(Furthermore, my condition allows scaling s(x) to Δs(x) at first, and i think that the scaling factor may introduce a rescale after the plain-ct mult, which would reduce the operation noise?

Thanks for your time!

@yhh The division @ypolyakov mentions, is done by actually implementing a reciprocal operation using a digital combinatorial circuit – which is not a trivial thing to do.

Hello! Sorry to jump in late on this.

Can you link me to small integers implementation in openfhe?

Thanks,
Janmajaya

I’d start here, look at the last set of examples named Eval…

binfhe/examples/README.md

1 Like