Comparison operations
Last updated
Was this helpful?
Last updated
Was this helpful?
This document details the comparison operations supported by TFHE-rs.
Homomorphic integers support comparison operations. However, due to Rust's limitations, you cannot overload comparison symbols. This is because Rust requires Boolean outputs from such operations, but homomorphic types return ciphertexts. Therefore, you should use the following methods, which conform to the naming conventions of Rust’s standard traits:
Supported operations:
eq
Binary
ne
Binary
gt
Binary
ge
Binary
lt
Binary
le
Binary
The following example shows how to perform comparison operations: