Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
asraa opened this issue Mar 6, 2024 · 2 comments
Closed

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

asraa opened this issue Mar 6, 2024 · 2 comments
Labels
dialect: bgv Issues concerning the bgv dialect

Comments

@asraa
Copy link
Collaborator

asraa commented Mar 6, 2024

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:

  • The RLWE encoding (which differs between CKKS, BGV, BFV)
  • A polynomial RingAttr (which described the ring attributes: like N and cmod)
  • The dimension of the ciphertext

This would require:

  • An individual BGV ciphertext no longer holds onto the global parameter data of which rings there are. The transformations for rings / dimension that happen during modulus or key switching will be encoded in their op attributes and will transform the ciphertext parameters.
  • Decouple / remove the "RLWEParamsAttr" which previously bundled (cmod, N, and dim) and just use poly "RingAttr" and add a "dimension" to the RLWE ciphertext.

Links:

copybara-service bot pushed a commit that referenced this issue Mar 6, 2024
copybara-service bot pushed a commit that referenced this issue Mar 6, 2024
copybara-service bot pushed a commit that referenced this issue Mar 6, 2024
copybara-service bot pushed a commit that referenced this issue Mar 6, 2024
copybara-service bot pushed a commit that referenced this issue Mar 6, 2024
@AlexanderViand-Intel
Copy link
Collaborator

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
Copy link
Collaborator Author

asraa commented Mar 6, 2024

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. :)

@j2kun j2kun added the dialect: bgv Issues concerning the bgv dialect label Mar 7, 2024
copybara-service bot pushed a commit that referenced this issue Mar 7, 2024
copybara-service bot pushed a commit that referenced this issue Mar 8, 2024
copybara-service bot pushed a commit that referenced this issue Mar 11, 2024
copybara-service bot pushed a commit that referenced this issue Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dialect: bgv Issues concerning the bgv dialect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants