Template Class HEEncryptor< Scheme::TFHE >

Class Documentation

template<>
class HEEncryptor<Scheme::TFHE>

Public Functions

HEEncryptor(HEContext<Scheme::TFHE> context, Secretkey<Scheme::TFHE> &secret_key)

Constructs a new HEEncryptor object for encrypting messages under the TFHE scheme.

This constructor sets up the encryption context with the specified TFHE parameters and secret key. It enables symmetric encryption of boolean messages into ciphertexts that can later be decrypted by the corresponding decryptor.

Parameters:
  • context – Reference to the HEContext object containing encryption parameters for the TFHE scheme.

  • secret_key – Reference to the Secretkey object used for encryption.

inline void encrypt(Ciphertext<Scheme::TFHE> &ciphertext, const std::vector<bool> &messages, const ExecutionOptions &options = ExecutionOptions())

Encrypts a vector of boolean messages into a TFHE ciphertext.

This function performs symmetric encryption by encoding the input boolean messages into Torus format and encrypting them using the secret key.

Parameters:
  • ciphertext – Output ciphertext where the encrypted result will be stored.

  • messages – Vector of boolean values representing the plaintext to encrypt.

~HEEncryptor()