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;stringspub use crate::core_crypto::gpu::vec::GpuIndex;gpupub use tfhe_hpu_backend;hpu
Modules§
- array
integer - backward_
compatibility integer - boolean
boolean - Welcome to the TFHE-rs
booleanmodule documentation! - conformance
- core_
crypto - Welcome to the TFHE-rs
core_cryptomodule documentation! - error
- integer
integer - Welcome to the TFHE-rs
integermodule documentation! - named
- prelude
integer - 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
- shortint
shortint - Welcome to the TFHE-rs
shortintmodule documentation! - strings
strings - zk
zk-pok
Macros§
- map_
ct_ ct hpuandinteger - Easily map an Hpu operation to std::ops rust trait
Structs§
- Client
Key integer - Key of the client
- Compact
Ciphertext List integer - Compact
Ciphertext List Builder integer - Compact
Ciphertext List Expander integer - Compact
Public Key integer - A more compact public key
- Compressed
Ciphertext List integer - Compressed
Ciphertext List Builder integer - Compressed
Compact Public Key integer - Compressed variant of CompactPublicKey
- Compressed
FheBool integer - Compressed FheBool
- Compressed
FheInt integer - Compressed FheInt
- Compressed
FheUint integer - Compressed FheUint
- Compressed
Public Key integer - Compressed classical public key.
- Compressed
Server Key integer - Compressed ServerKey
- Config
integer - The config type
- Config
Builder integer - The builder to create your config
- Cuda
Server Key integerandgpu - FheAscii
String stringsandinteger - FheBool
integer - The FHE boolean data type.
- FheBool
Conformance Params integer - FheBool
Id integer - FheInt
integer - A Generic FHE signed integer
- FheInt2
Id integer - Id for the FheInt2 data type.
- FheInt4
Id integer - Id for the FheInt4 data type.
- FheInt6
Id integer - Id for the FheInt6 data type.
- FheInt8
Id integer - Id for the FheInt8 data type.
- FheInt10
Id integer - Id for the FheInt10 data type.
- FheInt12
Id integer - Id for the FheInt12 data type.
- FheInt14
Id integer - Id for the FheInt14 data type.
- FheInt16
Id integer - Id for the FheInt16 data type.
- FheInt32
Id integer - Id for the FheInt32 data type.
- FheInt64
Id integer - Id for the FheInt64 data type.
- FheInt128
Id integer - Id for the FheInt128 data type.
- FheInt160
Id integer - Id for the FheInt160 data type.
- FheInt256
Id integer - Id for the FheInt256 data type.
- FheInt512
Id integer - Id for the FheInt512 data type.
- FheInt1024
Id integer - Id for the FheInt1024 data type.
- FheInt2048
Id integer - Id for the FheInt2048 data type.
- FheUint
integer - A Generic FHE unsigned integer
- FheUint2
Id integer - Id for the FheUint2 data type.
- FheUint4
Id integer - Id for the FheUint4 data type.
- FheUint6
Id integer - Id for the FheUint6 data type.
- FheUint8
Id integer - Id for the FheUint8 data type.
- FheUint10
Id integer - Id for the FheUint10 data type.
- FheUint12
Id integer - Id for the FheUint12 data type.
- FheUint14
Id integer - Id for the FheUint14 data type.
- FheUint16
Id integer - Id for the FheUint16 data type.
- FheUint32
Id integer - Id for the FheUint32 data type.
- FheUint64
Id integer - Id for the FheUint64 data type.
- FheUint128
Id integer - Id for the FheUint128 data type.
- FheUint160
Id integer - Id for the FheUint160 data type.
- FheUint256
Id integer - Id for the FheUint256 data type.
- FheUint512
Id integer - Id for the FheUint512 data type.
- FheUint1024
Id integer - Id for the FheUint1024 data type.
- FheUint2048
Id integer - Id for the FheUint2048 data type.
- KeySwitching
Key integer - Proven
Compact Ciphertext List zk-pokandinteger - Public
Key integer - Classical public key.
- Seed
- A seed value, used to initialize a generator.
- Server
Key integer - Key of the server
- Squashed
Noise FheBool integer - Squashed
Noise FheInt integer - Squashed
Noise FheUint integer - Tag
integer - Tag
Enums§
- Cuda
GpuChoice gpuandinteger - Device
integer - Devices supported by tfhe-rs
- Encryptable
String stringsandinteger - FheString
IsEmpty stringsandinteger - FheString
Len stringsandinteger - FheTypes
integer
Traits§
- FheId
integer - HlCompactable
integer - HlCompressible
integer - HlExpandable
integer - Integer
Id integer - 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_
keys integer - Generates keys using the provided config.
- set_
server_ key integer - The function used to initialize internal keys.
- unset_
server_ key integer - with_
server_ key_ as_ context integer
Type Aliases§
- Clear
Array integer - Compressed
FheInt2 integer - A compressed signed integer type with 2 bits
- Compressed
FheInt4 integer - A compressed signed integer type with 4 bits
- Compressed
FheInt6 integer - A compressed signed integer type with 6 bits
- Compressed
FheInt8 integer - A compressed signed integer type with 8 bits
- Compressed
FheInt10 integer - A compressed signed integer type with 10 bits
- Compressed
FheInt12 integer - A compressed signed integer type with 12 bits
- Compressed
FheInt14 integer - A compressed signed integer type with 14 bits
- Compressed
FheInt16 integer - A compressed signed integer type with 16 bits
- Compressed
FheInt32 integer - A compressed signed integer type with 32 bits
- Compressed
FheInt64 integer - A compressed signed integer type with 64 bits
- Compressed
FheInt128 integer - A compressed signed integer type with 128 bits
- Compressed
FheInt160 integer - A compressed signed integer type with 160 bits
- Compressed
FheInt256 integer - A compressed signed integer type with 256 bits
- Compressed
FheInt512 integer - A compressed signed integer type with 512 bits
- Compressed
FheInt1024 integer - A compressed signed integer type with 1024 bits
- Compressed
FheInt2048 integer - A compressed signed integer type with 2048 bits
- Compressed
FheUint2 integer - Compressed
FheUint4 integer - Compressed
FheUint6 integer - Compressed
FheUint8 integer - Compressed
FheUint10 integer - Compressed
FheUint12 integer - Compressed
FheUint14 integer - Compressed
FheUint16 integer - Compressed
FheUint32 integer - Compressed
FheUint64 integer - Compressed
FheUint128 integer - Compressed
FheUint160 integer - Compressed
FheUint256 integer - Compressed
FheUint512 integer - Compressed
FheUint1024 integer - Compressed
FheUint2048 integer - CpuFhe
Bool Array integer - CpuFhe
Bool Slice integer - CpuFhe
Bool Slice Mut integer - CpuFhe
Int2 Array integer - CpuFhe
Int2 Slice integer - CpuFhe
Int2 Slice Mut integer - CpuFhe
Int4 Array integer - CpuFhe
Int4 Slice integer - CpuFhe
Int4 Slice Mut integer - CpuFhe
Int8 Array integer - CpuFhe
Int8 Slice integer - CpuFhe
Int8 Slice Mut integer - CpuFhe
Int16 Array integer - CpuFhe
Int16 Slice integer - CpuFhe
Int16 Slice Mut integer - CpuFhe
Int32 Array integer - CpuFhe
Int32 Slice integer - CpuFhe
Int32 Slice Mut integer - CpuFhe
Int64 Array integer - CpuFhe
Int64 Slice integer - CpuFhe
Int64 Slice Mut integer - CpuFhe
Int128 Array integer - CpuFhe
Int128 Slice integer - CpuFhe
Int128 Slice Mut integer - CpuFhe
Int256 Array integer - CpuFhe
Int256 Slice integer - CpuFhe
Int256 Slice Mut integer - CpuFhe
IntArray integer - CpuFhe
IntSlice integer - CpuFhe
IntSlice Mut integer - CpuFhe
Uint2 Array integer - CpuFhe
Uint2 Slice integer - CpuFhe
Uint2 Slice Mut integer - CpuFhe
Uint4 Array integer - CpuFhe
Uint4 Slice integer - CpuFhe
Uint4 Slice Mut integer - CpuFhe
Uint8 Array integer - CpuFhe
Uint8 Slice integer - CpuFhe
Uint8 Slice Mut integer - CpuFhe
Uint16 Array integer - CpuFhe
Uint16 Slice integer - CpuFhe
Uint16 Slice Mut integer - CpuFhe
Uint32 Array integer - CpuFhe
Uint32 Slice integer - CpuFhe
Uint32 Slice Mut integer - CpuFhe
Uint64 Array integer - CpuFhe
Uint64 Slice integer - CpuFhe
Uint64 Slice Mut integer - CpuFhe
Uint128 Array integer - CpuFhe
Uint128 Slice integer - CpuFhe
Uint128 Slice Mut integer - CpuFhe
Uint256 Array integer - CpuFhe
Uint256 Slice integer - CpuFhe
Uint256 Slice Mut integer - CpuFhe
Uint Array integer - CpuFhe
Uint Slice integer - CpuFhe
Uint Slice Mut integer - FheBool
Array integer - FheBool
Slice integer - FheBool
Slice Mut integer - FheInt2
integer - A signed integer type with 2 bits
- FheInt4
integer - A signed integer type with 4 bits
- FheInt6
integer - A signed integer type with 6 bits
- FheInt8
integer - A signed integer type with 8 bits
- FheInt2
Array integer - FheInt2
Conformance Params integer - FheInt2
Slice integer - FheInt2
Slice Mut integer - FheInt4
Array integer - FheInt4
Conformance Params integer - FheInt4
Slice integer - FheInt4
Slice Mut integer - FheInt6
Conformance Params integer - FheInt8
Array integer - FheInt8
Conformance Params integer - FheInt8
Slice integer - FheInt8
Slice Mut integer - FheInt10
integer - A signed integer type with 10 bits
- FheInt12
integer - A signed integer type with 12 bits
- FheInt14
integer - A signed integer type with 14 bits
- FheInt16
integer - A signed integer type with 16 bits
- FheInt32
integer - A signed integer type with 32 bits
- FheInt64
integer - A signed integer type with 64 bits
- FheInt10
Conformance Params integer - FheInt12
Conformance Params integer - FheInt14
Conformance Params integer - FheInt16
Array integer - FheInt16
Conformance Params integer - FheInt16
Slice integer - FheInt16
Slice Mut integer - FheInt32
Array integer - FheInt32
Conformance Params integer - FheInt32
Slice integer - FheInt32
Slice Mut integer - FheInt64
Array integer - FheInt64
Conformance Params integer - FheInt64
Slice integer - FheInt64
Slice Mut integer - FheInt128
integer - A signed integer type with 128 bits
- FheInt160
integer - A signed integer type with 160 bits
- FheInt256
integer - A signed integer type with 256 bits
- FheInt512
integer - A signed integer type with 512 bits
- FheInt128
Array integer - FheInt128
Conformance Params integer - FheInt128
Slice integer - FheInt128
Slice Mut integer - FheInt160
Conformance Params integer - FheInt256
Array integer - FheInt256
Conformance Params integer - FheInt256
Slice integer - FheInt256
Slice Mut integer - FheInt512
Conformance Params integer - FheInt1024
integer - A signed integer type with 1024 bits
- FheInt2048
integer - A signed integer type with 2048 bits
- FheInt1024
Conformance Params integer - FheInt2048
Conformance Params integer - FheInt
Array integer - FheInt
Slice integer - FheInt
Slice Mut integer - FheUint2
integer - An unsigned integer type with 2 bits
- FheUint4
integer - An unsigned integer type with 4 bits
- FheUint6
integer - An unsigned integer type with 6 bits
- FheUint8
integer - An unsigned integer type with 8 bits
- FheUint2
Array integer - FheUint2
Conformance Params integer - FheUint2
Slice integer - FheUint2
Slice Mut integer - FheUint4
Array integer - FheUint4
Conformance Params integer - FheUint4
Slice integer - FheUint4
Slice Mut integer - FheUint6
Conformance Params integer - FheUint8
Array integer - FheUint8
Conformance Params integer - FheUint8
Slice integer - FheUint8
Slice Mut integer - FheUint10
integer - An unsigned integer type with 10 bits
- FheUint12
integer - An unsigned integer type with 12 bits
- FheUint14
integer - An unsigned integer type with 14 bits
- FheUint16
integer - An unsigned integer type with 16 bits
- FheUint32
integer - An unsigned integer type with 32 bits
- FheUint64
integer - An unsigned integer type with 64 bits
- FheUint10
Conformance Params integer - FheUint12
Conformance Params integer - FheUint14
Conformance Params integer - FheUint16
Array integer - FheUint16
Conformance Params integer - FheUint16
Slice integer - FheUint16
Slice Mut integer - FheUint32
Array integer - FheUint32
Conformance Params integer - FheUint32
Slice integer - FheUint32
Slice Mut integer - FheUint64
Array integer - FheUint64
Conformance Params integer - FheUint64
Slice integer - FheUint64
Slice Mut integer - FheUint128
integer - An unsigned integer type with 128 bits
- FheUint160
integer - An unsigned integer type with 160 bits
- FheUint256
integer - An unsigned integer type with 256 bits
- FheUint512
integer - An unsigned integer type with 512 bits
- FheUint128
Array integer - FheUint128
Conformance Params integer - FheUint128
Slice integer - FheUint128
Slice Mut integer - FheUint160
Conformance Params integer - FheUint256
Array integer - FheUint256
Conformance Params integer - FheUint256
Slice integer - FheUint256
Slice Mut integer - FheUint512
Conformance Params integer - FheUint1024
integer - An unsigned integer type with 1024 bits
- FheUint2048
integer - An unsigned integer type with 2048 bits
- FheUint1024
Conformance Params integer - FheUint2048
Conformance Params integer - FheUint
Array integer - FheUint
Slice integer - FheUint
Slice Mut integer - Result
Derive Macros§
- Versionize
- This derives the
VersionizeandUnversionizetrait for the target type.