fhe
fhe
dialect includes operations for encrypted data computations. This dialect is further divided into subgroups based on the encryption scheme, such as fhe.bgv
and fhe.ckks
, allowing tailored operations for each scheme. Within each subgroup, operations like addition, multiplication, and rotations are defined.
Examples
//Adds two ciphertexts using the BGV scheme.
%result = fhe.bgv.add %lhs, %rhs, %ctx : (RLWECiphertext, RLWECiphertext, BGVCryptoContext) -> RLWECiphertext
//Rotates coefficients of a CKKS ciphertext by the specified offset.
%rot = fhe.ckks.rotate %ciphertext, %offset, %ctx, %key : (RLWECiphertext, i32, CKKSCryptoContext, RLWEGaloisKey) -> RLWECiphertext
Last updated