diff --git a/tfhe/Cargo.toml b/tfhe/Cargo.toml index d39b21ae17..e3c19ad7a6 100644 --- a/tfhe/Cargo.toml +++ b/tfhe/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tfhe" -version = "0.11.1" +version = "0.11.2" edition = "2021" readme = "../README.md" keywords = ["fully", "homomorphic", "encryption", "fhe", "cryptography"] @@ -53,7 +53,9 @@ strum = { version = "0.26", features = ["derive"] } cbindgen = { version = "0.26.0", optional = true } [dependencies] -tfhe-csprng = { version = "0.5.0", path = "../tfhe-csprng", features = ["parallel"] } +tfhe-csprng = { version = "0.5.0", path = "../tfhe-csprng", features = [ + "parallel", +] } serde = { workspace = true, features = ["default", "derive"] } rayon = { workspace = true } bincode = "1.3.3" @@ -140,7 +142,15 @@ split-linked-modules = true [package.metadata.docs.rs] # TODO: manage builds for docs.rs based on their documentation https://docs.rs/about -features = ["boolean", "shortint", "integer", "gpu", "zk-pok", "software-prng", "strings"] +features = [ + "boolean", + "shortint", + "integer", + "gpu", + "zk-pok", + "software-prng", + "strings", +] rustdoc-args = ["--html-in-header", "katex-header.html"] ########### diff --git a/tfhe/docs/fundamentals/serialization.md b/tfhe/docs/fundamentals/serialization.md index 895fed752d..4e6330ea73 100644 --- a/tfhe/docs/fundamentals/serialization.md +++ b/tfhe/docs/fundamentals/serialization.md @@ -158,7 +158,7 @@ In the following example, we use [bincode](https://crates.io/crates/bincode) for [dependencies] # ... -tfhe = { version = "0.11.1", features = ["integer"] } +tfhe = { version = "0.11.2", features = ["integer"] } bincode = "1.3.3" ``` diff --git a/tfhe/docs/getting_started/installation.md b/tfhe/docs/getting_started/installation.md index d8d57ab6a1..a524745132 100644 --- a/tfhe/docs/getting_started/installation.md +++ b/tfhe/docs/getting_started/installation.md @@ -7,7 +7,7 @@ This document provides instructions to set up **TFHE-rs** in your project. First, add **TFHE-rs** as a dependency in your `Cargo.toml`. ```toml -tfhe = { version = "0.11.1", features = ["boolean", "shortint", "integer"] } +tfhe = { version = "0.11.2", features = ["boolean", "shortint", "integer"] } ``` {% hint style="info" %} @@ -35,5 +35,5 @@ By default, **TFHE-rs** makes the assumption that hardware AES features are enab To add support for older CPU, import **TFHE-rs** with the `software-prng` feature in your `Cargo.toml`: ```toml -tfhe = { version = "0.11.1", features = ["boolean", "shortint", "integer", "software-prng"] } +tfhe = { version = "0.11.2", features = ["boolean", "shortint", "integer", "software-prng"] } ``` diff --git a/tfhe/docs/getting_started/quick_start.md b/tfhe/docs/getting_started/quick_start.md index d9d28e8ff4..a7045c09e1 100644 --- a/tfhe/docs/getting_started/quick_start.md +++ b/tfhe/docs/getting_started/quick_start.md @@ -59,7 +59,7 @@ edition = "2021" Then add the following configuration to include **TFHE-rs**: ```toml -tfhe = { version = "0.11.1", features = ["integer"] } +tfhe = { version = "0.11.2", features = ["integer"] } ``` Your updated `Cargo.toml` file should look like this: @@ -71,7 +71,7 @@ version = "0.1.0" edition = "2021" [dependencies] -tfhe = { version = "0.11.1", features = ["integer"] } +tfhe = { version = "0.11.2", features = ["integer"] } ``` If you are on a different platform please refer to the [installation documentation](installation.md) for configuration options of other supported platforms. diff --git a/tfhe/docs/guides/array.md b/tfhe/docs/guides/array.md index 7f08b5b943..e71a463b1b 100644 --- a/tfhe/docs/guides/array.md +++ b/tfhe/docs/guides/array.md @@ -19,7 +19,7 @@ The following example shows a complete workflow of working with encrypted arrays # Cargo.toml [dependencies] -tfhe = { version = "0.11.1", features = ["integer"] } +tfhe = { version = "0.11.2", features = ["integer"] } ``` ```rust diff --git a/tfhe/docs/guides/data_versioning.md b/tfhe/docs/guides/data_versioning.md index b83dc332d5..f0713478ff 100644 --- a/tfhe/docs/guides/data_versioning.md +++ b/tfhe/docs/guides/data_versioning.md @@ -16,7 +16,7 @@ You can load serialized data with the `unversionize` function, even in newer ver [dependencies] # ... -tfhe = { version = "0.11.1", features = ["integer"] } +tfhe = { version = "0.11.2", features = ["integer"] } tfhe-versionable = "0.4.0" bincode = "1.3.3" ``` diff --git a/tfhe/docs/guides/run_on_gpu.md b/tfhe/docs/guides/run_on_gpu.md index b0e7905fd6..9dab338a8b 100644 --- a/tfhe/docs/guides/run_on_gpu.md +++ b/tfhe/docs/guides/run_on_gpu.md @@ -19,7 +19,7 @@ To use the **TFHE-rs** GPU backend in your project, add the following dependency ```toml -tfhe = { version = "0.11.1", features = ["boolean", "shortint", "integer", "gpu"] } +tfhe = { version = "0.11.2", features = ["boolean", "shortint", "integer", "gpu"] } ``` {% hint style="success" %} diff --git a/tfhe/docs/guides/strings.md b/tfhe/docs/guides/strings.md index ecb84591c3..d4273d3522 100644 --- a/tfhe/docs/guides/strings.md +++ b/tfhe/docs/guides/strings.md @@ -29,7 +29,7 @@ Here is an example: # Cargo.toml [dependencies] -tfhe = { version = "0.11.1", features = ["integer", "strings"] } +tfhe = { version = "0.11.2", features = ["integer", "strings"] } ``` ```rust diff --git a/tfhe/docs/references/core-crypto-api/tutorial.md b/tfhe/docs/references/core-crypto-api/tutorial.md index f5bde62f3e..a01edf8b93 100644 --- a/tfhe/docs/references/core-crypto-api/tutorial.md +++ b/tfhe/docs/references/core-crypto-api/tutorial.md @@ -9,7 +9,7 @@ Welcome to this tutorial about `TFHE-rs` `core_crypto` module. To use `TFHE-rs`, it first has to be added as a dependency in the `Cargo.toml`: ```toml -tfhe = { version = "0.11.1" } +tfhe = { version = "0.11.2" } ``` ### Commented code to double a 2-bit message in a leveled fashion and using a PBS with the `core_crypto` module. diff --git a/tfhe/docs/tutorials/ascii_fhe_string.md b/tfhe/docs/tutorials/ascii_fhe_string.md index ab41d51c19..6854b60edd 100644 --- a/tfhe/docs/tutorials/ascii_fhe_string.md +++ b/tfhe/docs/tutorials/ascii_fhe_string.md @@ -29,7 +29,7 @@ To use the `FheUint8` type, enable the `integer` feature: # Cargo.toml [dependencies] -tfhe = { version = "0.11.1", features = ["integer"] } +tfhe = { version = "0.11.2", features = ["integer"] } ``` The `MyFheString::encrypt` function performs data validation to ensure the input string contains only ASCII characters. @@ -166,7 +166,7 @@ First, add the feature in your `Cargo.toml` # Cargo.toml [dependencies] -tfhe = { version = "0.11.1", features = ["strings"] } +tfhe = { version = "0.11.2", features = ["strings"] } ``` The `FheAsciiString` type allows to simply do homomorphic case changing of encrypted strings (and much more!): diff --git a/tfhe/docs/tutorials/parity_bit.md b/tfhe/docs/tutorials/parity_bit.md index 3db4bbb945..06e0d9c029 100644 --- a/tfhe/docs/tutorials/parity_bit.md +++ b/tfhe/docs/tutorials/parity_bit.md @@ -17,7 +17,7 @@ This function returns a Boolean (`true` or `false`) so that the total count of ` ```toml # Cargo.toml -tfhe = { version = "0.11.1", features = ["integer"] } +tfhe = { version = "0.11.2", features = ["integer"] } ``` First, define the verification function. diff --git a/tfhe/src/integer/compression_keys.rs b/tfhe/src/integer/compression_keys.rs index 99d2fd9e6e..4d6a2c3d1f 100644 --- a/tfhe/src/integer/compression_keys.rs +++ b/tfhe/src/integer/compression_keys.rs @@ -1,6 +1,7 @@ use super::ClientKey; use crate::conformance::ParameterSetConformant; use crate::integer::backward_compatibility::list_compression::*; +use crate::named::Named; use serde::{Deserialize, Serialize}; use tfhe_versionable::Versionize; @@ -34,6 +35,26 @@ pub struct CompressedDecompressionKey { pub(crate) key: crate::shortint::list_compression::CompressedDecompressionKey, } +impl Named for CompressionPrivateKeys { + const NAME: &'static str = "high_level_api::CompressionPrivateKeys"; +} + +impl Named for CompressionKey { + const NAME: &'static str = "high_level_api::CompressionKey"; +} + +impl Named for DecompressionKey { + const NAME: &'static str = "high_level_api::DecompressionKey"; +} + +impl Named for CompressedCompressionKey { + const NAME: &'static str = "high_level_api::CompressedCompressionKey"; +} + +impl Named for CompressedDecompressionKey { + const NAME: &'static str = "high_level_api::CompressedDecompressionKey"; +} + impl CompressedCompressionKey { pub fn decompress(&self) -> CompressionKey { CompressionKey {