lwe-to-polynomial: migrate encrypt/decrypt lowering to support RNS
Open
dialect: lwe
dialect: polynomial
- Dominant language
- MLIR
- Stars
- 906
- Forks
- 171
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 32
Description
PR #1190 migrated most of the types to NewLWEType, however, for lwe-to-polynomial, there are some non-trivial changes that needs to be done.
This also relates to #882
`NewLWEPlaintext` now has a `PlaintextSpace.Ring` (for example `Z_65537 / (X^N + 1)`), which is different from `NewCiphertext`'s `CiphertextSpace.Ring` (typically RNS)
+ lowering should convert plaintext ring to rns ring
+ lowering should properly handle modulus switching from `Z_65537` to `Z_qi` (ciphertext rns modulus), which needs `mod_arith` dialect support, and it is non-trivial.
+ lowering should handle scaling factor for CKKS scheme.
Contributor guide
Assessment
This issue has not been assessed yet.