FheLib
is a library implemented inside fhevm-go. It offers FHE-related functionalities such as homomorphic operations, input verification and so on. FheLib is exposed as a single precompiled
contract (or a precompile
for short) that is integrated into the underlying blockchain.
FheLib functions can be called by calling the FheLib precompile with a respective EVM function selector.
This page describes the required inputs, behaviours and outputs of some of these functions.
The GetCiphertext
function returns a serialized TFHE ciphertext given:
the ebool/e(u)int value (also called a handle) for which the ciphertext is requested
GetCiphertext only works via the eth_call
RPC.
To call GetCiphertext via eth_call
, the following Python can serve as an example: