Crate tfhe

Source
Expand description

Welcome to the TFHE-rs API documentation!

TFHE-rs is a fully homomorphic encryption (FHE) library that implements Zama’s variant of TFHE.

Re-exports§

pub use error::Error;
pub use error::ErrorKind;
pub use crate::integer::server_key::MatchValues;
pub use crate::integer::parameters::CompactCiphertextListConformanceParams;
pub use crate::safe_serialization::DeserializationConfig;
pub use crate::safe_serialization::SerializationConfig;
pub use crate::strings::ciphertext::ClearString;strings
pub use crate::core_crypto::gpu::vec::GpuIndex;gpu
pub use tfhe_hpu_backend;hpu

Modules§

arrayinteger
backward_compatibilityinteger
booleanboolean
Welcome to the TFHE-rs boolean module documentation!
conformance
core_crypto
Welcome to the TFHE-rs core_crypto module documentation!
error
integerinteger
Welcome to the TFHE-rs integer module documentation!
named
preludeinteger
The tfhe prelude. The purpose of this module is to make it easier to have the most commonly needed traits of this crate.
safe_serialization
Serialization utilities with some safety checks
shortintshortint
Welcome to the TFHE-rs shortint module documentation!
stringsstrings
zkzk-pok

Macros§

map_ct_cthpu and integer
Easily map an Hpu operation to std::ops rust trait

Structs§

ClientKeyinteger
Key of the client
CompactCiphertextListinteger
CompactCiphertextListBuilderinteger
CompactCiphertextListExpanderinteger
CompactPublicKeyinteger
A more compact public key
CompressedCiphertextListinteger
CompressedCiphertextListBuilderinteger
CompressedCompactPublicKeyinteger
Compressed variant of CompactPublicKey
CompressedFheBoolinteger
Compressed FheBool
CompressedFheIntinteger
Compressed FheInt
CompressedFheUintinteger
Compressed FheUint
CompressedPublicKeyinteger
Compressed classical public key.
CompressedServerKeyinteger
Compressed ServerKey
Configinteger
The config type
ConfigBuilderinteger
The builder to create your config
CudaServerKeyinteger and gpu
FheAsciiStringstrings and integer
FheBoolinteger
The FHE boolean data type.
FheBoolConformanceParamsinteger
FheBoolIdinteger
FheIntinteger
A Generic FHE signed integer
FheInt2Idinteger
Id for the FheInt2 data type.
FheInt4Idinteger
Id for the FheInt4 data type.
FheInt6Idinteger
Id for the FheInt6 data type.
FheInt8Idinteger
Id for the FheInt8 data type.
FheInt10Idinteger
Id for the FheInt10 data type.
FheInt12Idinteger
Id for the FheInt12 data type.
FheInt14Idinteger
Id for the FheInt14 data type.
FheInt16Idinteger
Id for the FheInt16 data type.
FheInt32Idinteger
Id for the FheInt32 data type.
FheInt64Idinteger
Id for the FheInt64 data type.
FheInt128Idinteger
Id for the FheInt128 data type.
FheInt160Idinteger
Id for the FheInt160 data type.
FheInt256Idinteger
Id for the FheInt256 data type.
FheInt512Idinteger
Id for the FheInt512 data type.
FheInt1024Idinteger
Id for the FheInt1024 data type.
FheInt2048Idinteger
Id for the FheInt2048 data type.
FheUintinteger
A Generic FHE unsigned integer
FheUint2Idinteger
Id for the FheUint2 data type.
FheUint4Idinteger
Id for the FheUint4 data type.
FheUint6Idinteger
Id for the FheUint6 data type.
FheUint8Idinteger
Id for the FheUint8 data type.
FheUint10Idinteger
Id for the FheUint10 data type.
FheUint12Idinteger
Id for the FheUint12 data type.
FheUint14Idinteger
Id for the FheUint14 data type.
FheUint16Idinteger
Id for the FheUint16 data type.
FheUint32Idinteger
Id for the FheUint32 data type.
FheUint64Idinteger
Id for the FheUint64 data type.
FheUint128Idinteger
Id for the FheUint128 data type.
FheUint160Idinteger
Id for the FheUint160 data type.
FheUint256Idinteger
Id for the FheUint256 data type.
FheUint512Idinteger
Id for the FheUint512 data type.
FheUint1024Idinteger
Id for the FheUint1024 data type.
FheUint2048Idinteger
Id for the FheUint2048 data type.
KeySwitchingKeyinteger
ProvenCompactCiphertextListzk-pok and integer
PublicKeyinteger
Classical public key.
Seed
A seed value, used to initialize a generator.
ServerKeyinteger
Key of the server
SquashedNoiseFheBoolinteger
SquashedNoiseFheIntinteger
SquashedNoiseFheUintinteger
Taginteger
Tag

Enums§

CudaGpuChoicegpu and integer
Deviceinteger
Devices supported by tfhe-rs
EncryptableStringstrings and integer
FheStringIsEmptystrings and integer
FheStringLenstrings and integer
FheTypesinteger

Traits§

FheIdinteger
HlCompactableinteger
HlCompressibleinteger
HlExpandableinteger
IntegerIdinteger
Trait to mark ID type for integers
Unversionize
This trait means that we can convert from a versioned enum into the target type.
Versionize
This trait means that the type can be converted into a versioned equivalent type.

Functions§

generate_keysinteger
Generates keys using the provided config.
set_server_keyinteger
The function used to initialize internal keys.
unset_server_keyinteger
with_server_key_as_contextinteger

Type Aliases§

ClearArrayinteger
CompressedFheInt2integer
A compressed signed integer type with 2 bits
CompressedFheInt4integer
A compressed signed integer type with 4 bits
CompressedFheInt6integer
A compressed signed integer type with 6 bits
CompressedFheInt8integer
A compressed signed integer type with 8 bits
CompressedFheInt10integer
A compressed signed integer type with 10 bits
CompressedFheInt12integer
A compressed signed integer type with 12 bits
CompressedFheInt14integer
A compressed signed integer type with 14 bits
CompressedFheInt16integer
A compressed signed integer type with 16 bits
CompressedFheInt32integer
A compressed signed integer type with 32 bits
CompressedFheInt64integer
A compressed signed integer type with 64 bits
CompressedFheInt128integer
A compressed signed integer type with 128 bits
CompressedFheInt160integer
A compressed signed integer type with 160 bits
CompressedFheInt256integer
A compressed signed integer type with 256 bits
CompressedFheInt512integer
A compressed signed integer type with 512 bits
CompressedFheInt1024integer
A compressed signed integer type with 1024 bits
CompressedFheInt2048integer
A compressed signed integer type with 2048 bits
CompressedFheUint2integer
CompressedFheUint4integer
CompressedFheUint6integer
CompressedFheUint8integer
CompressedFheUint10integer
CompressedFheUint12integer
CompressedFheUint14integer
CompressedFheUint16integer
CompressedFheUint32integer
CompressedFheUint64integer
CompressedFheUint128integer
CompressedFheUint160integer
CompressedFheUint256integer
CompressedFheUint512integer
CompressedFheUint1024integer
CompressedFheUint2048integer
CpuFheBoolArrayinteger
CpuFheBoolSliceinteger
CpuFheBoolSliceMutinteger
CpuFheInt2Arrayinteger
CpuFheInt2Sliceinteger
CpuFheInt2SliceMutinteger
CpuFheInt4Arrayinteger
CpuFheInt4Sliceinteger
CpuFheInt4SliceMutinteger
CpuFheInt8Arrayinteger
CpuFheInt8Sliceinteger
CpuFheInt8SliceMutinteger
CpuFheInt16Arrayinteger
CpuFheInt16Sliceinteger
CpuFheInt16SliceMutinteger
CpuFheInt32Arrayinteger
CpuFheInt32Sliceinteger
CpuFheInt32SliceMutinteger
CpuFheInt64Arrayinteger
CpuFheInt64Sliceinteger
CpuFheInt64SliceMutinteger
CpuFheInt128Arrayinteger
CpuFheInt128Sliceinteger
CpuFheInt128SliceMutinteger
CpuFheInt256Arrayinteger
CpuFheInt256Sliceinteger
CpuFheInt256SliceMutinteger
CpuFheIntArrayinteger
CpuFheIntSliceinteger
CpuFheIntSliceMutinteger
CpuFheUint2Arrayinteger
CpuFheUint2Sliceinteger
CpuFheUint2SliceMutinteger
CpuFheUint4Arrayinteger
CpuFheUint4Sliceinteger
CpuFheUint4SliceMutinteger
CpuFheUint8Arrayinteger
CpuFheUint8Sliceinteger
CpuFheUint8SliceMutinteger
CpuFheUint16Arrayinteger
CpuFheUint16Sliceinteger
CpuFheUint16SliceMutinteger
CpuFheUint32Arrayinteger
CpuFheUint32Sliceinteger
CpuFheUint32SliceMutinteger
CpuFheUint64Arrayinteger
CpuFheUint64Sliceinteger
CpuFheUint64SliceMutinteger
CpuFheUint128Arrayinteger
CpuFheUint128Sliceinteger
CpuFheUint128SliceMutinteger
CpuFheUint256Arrayinteger
CpuFheUint256Sliceinteger
CpuFheUint256SliceMutinteger
CpuFheUintArrayinteger
CpuFheUintSliceinteger
CpuFheUintSliceMutinteger
FheBoolArrayinteger
FheBoolSliceinteger
FheBoolSliceMutinteger
FheInt2integer
A signed integer type with 2 bits
FheInt4integer
A signed integer type with 4 bits
FheInt6integer
A signed integer type with 6 bits
FheInt8integer
A signed integer type with 8 bits
FheInt2Arrayinteger
FheInt2ConformanceParamsinteger
FheInt2Sliceinteger
FheInt2SliceMutinteger
FheInt4Arrayinteger
FheInt4ConformanceParamsinteger
FheInt4Sliceinteger
FheInt4SliceMutinteger
FheInt6ConformanceParamsinteger
FheInt8Arrayinteger
FheInt8ConformanceParamsinteger
FheInt8Sliceinteger
FheInt8SliceMutinteger
FheInt10integer
A signed integer type with 10 bits
FheInt12integer
A signed integer type with 12 bits
FheInt14integer
A signed integer type with 14 bits
FheInt16integer
A signed integer type with 16 bits
FheInt32integer
A signed integer type with 32 bits
FheInt64integer
A signed integer type with 64 bits
FheInt10ConformanceParamsinteger
FheInt12ConformanceParamsinteger
FheInt14ConformanceParamsinteger
FheInt16Arrayinteger
FheInt16ConformanceParamsinteger
FheInt16Sliceinteger
FheInt16SliceMutinteger
FheInt32Arrayinteger
FheInt32ConformanceParamsinteger
FheInt32Sliceinteger
FheInt32SliceMutinteger
FheInt64Arrayinteger
FheInt64ConformanceParamsinteger
FheInt64Sliceinteger
FheInt64SliceMutinteger
FheInt128integer
A signed integer type with 128 bits
FheInt160integer
A signed integer type with 160 bits
FheInt256integer
A signed integer type with 256 bits
FheInt512integer
A signed integer type with 512 bits
FheInt128Arrayinteger
FheInt128ConformanceParamsinteger
FheInt128Sliceinteger
FheInt128SliceMutinteger
FheInt160ConformanceParamsinteger
FheInt256Arrayinteger
FheInt256ConformanceParamsinteger
FheInt256Sliceinteger
FheInt256SliceMutinteger
FheInt512ConformanceParamsinteger
FheInt1024integer
A signed integer type with 1024 bits
FheInt2048integer
A signed integer type with 2048 bits
FheInt1024ConformanceParamsinteger
FheInt2048ConformanceParamsinteger
FheIntArrayinteger
FheIntSliceinteger
FheIntSliceMutinteger
FheUint2integer
An unsigned integer type with 2 bits
FheUint4integer
An unsigned integer type with 4 bits
FheUint6integer
An unsigned integer type with 6 bits
FheUint8integer
An unsigned integer type with 8 bits
FheUint2Arrayinteger
FheUint2ConformanceParamsinteger
FheUint2Sliceinteger
FheUint2SliceMutinteger
FheUint4Arrayinteger
FheUint4ConformanceParamsinteger
FheUint4Sliceinteger
FheUint4SliceMutinteger
FheUint6ConformanceParamsinteger
FheUint8Arrayinteger
FheUint8ConformanceParamsinteger
FheUint8Sliceinteger
FheUint8SliceMutinteger
FheUint10integer
An unsigned integer type with 10 bits
FheUint12integer
An unsigned integer type with 12 bits
FheUint14integer
An unsigned integer type with 14 bits
FheUint16integer
An unsigned integer type with 16 bits
FheUint32integer
An unsigned integer type with 32 bits
FheUint64integer
An unsigned integer type with 64 bits
FheUint10ConformanceParamsinteger
FheUint12ConformanceParamsinteger
FheUint14ConformanceParamsinteger
FheUint16Arrayinteger
FheUint16ConformanceParamsinteger
FheUint16Sliceinteger
FheUint16SliceMutinteger
FheUint32Arrayinteger
FheUint32ConformanceParamsinteger
FheUint32Sliceinteger
FheUint32SliceMutinteger
FheUint64Arrayinteger
FheUint64ConformanceParamsinteger
FheUint64Sliceinteger
FheUint64SliceMutinteger
FheUint128integer
An unsigned integer type with 128 bits
FheUint160integer
An unsigned integer type with 160 bits
FheUint256integer
An unsigned integer type with 256 bits
FheUint512integer
An unsigned integer type with 512 bits
FheUint128Arrayinteger
FheUint128ConformanceParamsinteger
FheUint128Sliceinteger
FheUint128SliceMutinteger
FheUint160ConformanceParamsinteger
FheUint256Arrayinteger
FheUint256ConformanceParamsinteger
FheUint256Sliceinteger
FheUint256SliceMutinteger
FheUint512ConformanceParamsinteger
FheUint1024integer
An unsigned integer type with 1024 bits
FheUint2048integer
An unsigned integer type with 2048 bits
FheUint1024ConformanceParamsinteger
FheUint2048ConformanceParamsinteger
FheUintArrayinteger
FheUintSliceinteger
FheUintSliceMutinteger
Result

Derive Macros§

Versionize
This derives the Versionize and Unversionize trait for the target type.