heir
heir copied to clipboard
Add `arith.cmpi` lowering from Iliashenko & Zucca to `--secret-to-bgv`
Implement techniques from "Faster homomorphic comparison operations for BGV and BFV" [^1]
Caveat: this approach is only really practical for small plaintext modulus (e.g.,$p = 257$), but that requires advanced CRT splitting into $R_{p^d}$ for $d > 1$, which is not supported by OpenFHE.
[^1]: Iliashenko, I. and Zucca, V. 2021. Faster homomorphic comparison operations for BGV and BFV. Proceedings on Privacy Enhancing Technologies. 2021, 3 (Jul. 2021), 246–264.