google / heir

A compiler for homomorphic encryption
https://heir.dev/
Apache License 2.0
285 stars 40 forks source link

bgv: use LWE toolbox dialect for RLWE ciphertext types #487

Closed asraa closed 5 months ago

asraa commented 5 months ago

Right now, a BGV ciphertext holds on to a dimension (# of polys), a list of rings, and a level (describing which of the list of rings it belongs to). An LWE dialect RLWE ciphertext only holds on to an encoding and an RLWEparams attribute containing the N, cmod, and dim of the RLWE ciphertext.

To unify these, I'm inclined to make an LWE dialect RLWE ciphertext hold onto:

This would require:

Links:

AlexanderViand-Intel commented 5 months ago

I think this would be a great point to discuss at tomorrows' working group meeting! For example, should we go even further and just jump straight to GLWE, i.e., also combining LWE and RLWE ciphertexts?

asraa commented 5 months ago

I'll add it to our agenda!

For example, should we go even further and just jump straight to GLWE, i.e., also combining LWE and RLWE ciphertexts?

I remember we had some initial discussion about this. Let's revisit - I'll refresh my memory about our old conversation and see if those still apply. :)