Template Class HELogicOperator< Scheme::TFHE >

Class Documentation

template<>
class HELogicOperator<Scheme::TFHE>

Public Functions

HELogicOperator(HEContext<Scheme::TFHE> &context)

Initializes a logic operator for the TFHE scheme.

Sets up logic gate evaluation using the given encryption context.

Parameters:

context – TFHE encryption context.

inline void NAND(Ciphertext<Scheme::TFHE> &input1, Ciphertext<Scheme::TFHE> &input2, Ciphertext<Scheme::TFHE> &output, Bootstrappingkey<Scheme::TFHE> &boot_key, const ExecutionOptions &options = ExecutionOptions())

Evaluates the NAND gate on two TFHE ciphertexts.

Computes the NAND of input1 and input2, writing the result to output. Requires the bootstrapping key for ciphertext refresh.

Parameters:
  • input1 – First input ciphertext.

  • input2 – Second input ciphertext.

  • output – Output ciphertext after NAND operation.

  • boot_key – Bootstrapping key for the operation.

  • options – Optional CUDA execution settings.

inline void AND(Ciphertext<Scheme::TFHE> &input1, Ciphertext<Scheme::TFHE> &input2, Ciphertext<Scheme::TFHE> &output, Bootstrappingkey<Scheme::TFHE> &boot_key, const ExecutionOptions &options = ExecutionOptions())

Evaluates the AND gate on two TFHE ciphertexts.

Computes the AND of input1 and input2, writing the result to output. Requires the bootstrapping key for ciphertext refresh.

Parameters:
  • input1 – First input ciphertext.

  • input2 – Second input ciphertext.

  • output – Output ciphertext after AND operation.

  • boot_key – Bootstrapping key for the operation.

  • options – Optional CUDA execution settings.

inline void NOR(Ciphertext<Scheme::TFHE> &input1, Ciphertext<Scheme::TFHE> &input2, Ciphertext<Scheme::TFHE> &output, Bootstrappingkey<Scheme::TFHE> &boot_key, const ExecutionOptions &options = ExecutionOptions())

Evaluates the NOR gate on two TFHE ciphertexts.

Computes the NOR of input1 and input2, writing the result to output. Requires the bootstrapping key for ciphertext refresh.

Parameters:
  • input1 – First input ciphertext.

  • input2 – Second input ciphertext.

  • output – Output ciphertext after NOR operation.

  • boot_key – Bootstrapping key for the operation.

  • options – Optional CUDA execution settings.

inline void OR(Ciphertext<Scheme::TFHE> &input1, Ciphertext<Scheme::TFHE> &input2, Ciphertext<Scheme::TFHE> &output, Bootstrappingkey<Scheme::TFHE> &boot_key, const ExecutionOptions &options = ExecutionOptions())

Evaluates the OR gate on two TFHE ciphertexts.

Computes the OR of input1 and input2, writing the result to output. Requires the bootstrapping key for ciphertext refresh.

Parameters:
  • input1 – First input ciphertext.

  • input2 – Second input ciphertext.

  • output – Output ciphertext after OR operation.

  • boot_key – Bootstrapping key for the operation.

  • options – Optional CUDA execution settings.

inline void XNOR(Ciphertext<Scheme::TFHE> &input1, Ciphertext<Scheme::TFHE> &input2, Ciphertext<Scheme::TFHE> &output, Bootstrappingkey<Scheme::TFHE> &boot_key, const ExecutionOptions &options = ExecutionOptions())

Evaluates the XNOR gate on two TFHE ciphertexts.

Computes the XNOR of input1 and input2, writing the result to output. Requires the bootstrapping key for ciphertext refresh.

Parameters:
  • input1 – First input ciphertext.

  • input2 – Second input ciphertext.

  • output – Output ciphertext after XNOR operation.

  • boot_key – Bootstrapping key for the operation.

  • options – Optional CUDA execution settings.

inline void XOR(Ciphertext<Scheme::TFHE> &input1, Ciphertext<Scheme::TFHE> &input2, Ciphertext<Scheme::TFHE> &output, Bootstrappingkey<Scheme::TFHE> &boot_key, const ExecutionOptions &options = ExecutionOptions())

Evaluates the XOR gate on two TFHE ciphertexts.

Computes the XOR of input1 and input2, writing the result to output. Requires the bootstrapping key for ciphertext refresh.

Parameters:
  • input1 – First input ciphertext.

  • input2 – Second input ciphertext.

  • output – Output ciphertext after XOR operation.

  • boot_key – Bootstrapping key for the operation.

  • options – Optional CUDA execution settings.

inline void NOT(Ciphertext<Scheme::TFHE> &input1, Ciphertext<Scheme::TFHE> &output, const ExecutionOptions &options = ExecutionOptions())

Evaluates the NOT gate on two TFHE ciphertexts.

Computes the NOT of input1 and input2, writing the result to output. Requires the bootstrapping key for ciphertext refresh.

Parameters:
  • input1 – First input ciphertext.

  • input2 – Second input ciphertext.

  • output – Output ciphertext after NOT operation.

  • options – Optional CUDA execution settings.

inline void MUX(Ciphertext<Scheme::TFHE> &input1, Ciphertext<Scheme::TFHE> &input2, Ciphertext<Scheme::TFHE> &control_input, Ciphertext<Scheme::TFHE> &output, Bootstrappingkey<Scheme::TFHE> &boot_key, const ExecutionOptions &options = ExecutionOptions())

Evaluates the MUX(multiplexer) gate on two TFHE ciphertexts.

Computes the MUX of input1 and input2, writing the result to output. Requires the bootstrapping key for ciphertext refresh.

Parameters:
  • input1 – First input ciphertext.

  • input2 – Second input ciphertext.

  • output – Output ciphertext after MUX operation.

  • boot_key – Bootstrapping key for the operation.

  • options – Optional CUDA execution settings.