Operations
The TFHE
library defines the following operations with FHE ciphertexts:
name | function name | symbol | type |
---|---|---|---|
Add |
|
| Binary |
Sub |
|
| Binary |
Mul |
|
| Binary |
Div (plaintext divisor) |
| Binary | |
Rem (plaintext divisor) |
| Binary | |
BitAnd |
|
| Binary |
BitOr |
|
| Binary |
BitXor |
|
| Binary |
Shift Right |
| Binary | |
Shift Left |
| Binary | |
Equal |
| Binary | |
Not equal |
| Binary | |
Greater than or equal |
| Binary | |
Greater than |
| Binary | |
Less than or equal |
| Binary | |
Less than |
| Binary | |
Min |
| Binary | |
Max |
| Binary | |
Neg |
|
| Unary |
Not |
|
| Unary |
Cmux |
| Ternary | |
Decrypt |
| Decryption | |
Reencrypt |
| Reencryption | |
Optimistic Require |
| Decryption | |
Random unsigned int (mockup) |
| Random |
NOTE 1: Random encrypted integers that are generated fully on-chain. Currently, implemented as a mockup by using a PRNG in the plain. Not for use in production!
Overloaded operators +
, -
, *
, &
, ... on encrypted integers are supported (using for). As of now, overloaded operators will call the versions without an overflow check.
More information about the supported operations can be found in the function specifications page or in the TFHE-rs docs.
If you find yourself in search of a missing feature, we encourage you to consult our roadmap for upcoming developments. Alternatively, don't hesitate to reach out to us on Discord or visit our community forum.
Last updated