google / google/heir

lwe-to-polynomial: migrate encrypt/decrypt lowering to support RNS

Open
#1,199 9 comments 1 reaction 1 assignee Claimed by @asraa View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.