Files
tfhe-rs/tfhe/docs/fhe-computation/operations
David Testé 4352e9adb7 docs: fix typo
This error isn't caught by typos-cli tool.
2025-04-23 15:17:40 +02:00
..
2025-04-23 15:17:40 +02:00
2025-02-20 17:29:36 +01:00

Operations

This document gives a high-level overview of various operations on encrypted integers supported by TFHE-rs.

TFHE-rs supports various operations on encrypted integers (Enc) of any size between 1 and 256 bits. These operations can also work between encrypted integers and clear integers (Int).

name symbol Enc/Enc Enc/ Int
Neg - ✔️ ✔️
Add + ✔️ ✔️
Sub - ✔️ ✔️
Mul * ✔️ ✔️
Div / ✔️ ✔️
Rem % ✔️ ✔️
Not ! ✔️ ✔️
BitAnd & ✔️ ✔️
BitOr | ✔️ ✔️
BitXor ^ ✔️ ✔️
Shr >> ✔️ ✔️
Shl << ✔️ ✔️
Min min ✔️ ✔️
Max max ✔️ ✔️
Greater than gt ✔️ ✔️
Greater or equal than ge ✔️ ✔️
Less than lt ✔️ ✔️
Less or equal than le ✔️ ✔️
Equal eq ✔️ ✔️
Cast (into dest type) cast_into ✔️ ✖️
Cast (from src type) cast_from ✔️ ✖️
Ternary operator select ✔️ ✖️