From 0d7a88e640a98612c0743d01062bb81d2a7e4a23 Mon Sep 17 00:00:00 2001 From: tmontaigu Date: Wed, 22 May 2024 18:22:07 +0200 Subject: [PATCH] chore(tfhe): bump to 0.5.5 --- tfhe/Cargo.toml | 2 +- tfhe/docs/core_crypto/tutorial.md | 8 ++++---- tfhe/docs/getting_started/installation.md | 4 ++-- tfhe/docs/getting_started/quick_start.md | 2 +- tfhe/docs/how_to/migrate_data.md | 22 +++++++++++----------- tfhe/docs/how_to/run_on_gpu.md | 4 ++-- tfhe/docs/how_to/serialization.md | 2 +- tfhe/docs/tutorials/ascii_fhe_string.md | 2 +- tfhe/docs/tutorials/parity_bit.md | 2 +- 9 files changed, 24 insertions(+), 24 deletions(-) diff --git a/tfhe/Cargo.toml b/tfhe/Cargo.toml index 84c7e90ef9..ee529ad2d8 100644 --- a/tfhe/Cargo.toml +++ b/tfhe/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tfhe" -version = "0.5.4" +version = "0.5.5" edition = "2021" readme = "../README.md" keywords = ["fully", "homomorphic", "encryption", "fhe", "cryptography"] diff --git a/tfhe/docs/core_crypto/tutorial.md b/tfhe/docs/core_crypto/tutorial.md index 2ed3990350..1154773bb8 100644 --- a/tfhe/docs/core_crypto/tutorial.md +++ b/tfhe/docs/core_crypto/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.5.4", features = [ "x86_64-unix" ] } +tfhe = { version = "0.5.5", features = [ "x86_64-unix" ] } ``` This enables the `x86_64-unix` feature to have efficient implementations of various algorithms for `x86_64` CPUs on a Unix-like system. The 'unix' suffix indicates that the `UnixSeeder`, which uses `/dev/random` to generate random numbers, is activated as a fallback if no hardware number generator is available (like `rdseed` on `x86_64` or if the [`Randomization Services`](https://developer.apple.com/documentation/security/1399291-secrandomcopybytes?language=objc) on Apple platforms are not available). To avoid having the `UnixSeeder` as a potential fallback or to run on non-Unix systems (e.g., Windows), the `x86_64` feature is sufficient. @@ -19,19 +19,19 @@ For Apple Silicon, the `aarch64-unix` or `aarch64` feature should be enabled. `a In short: For `x86_64`-based machines running Unix-like OSes: ```toml -tfhe = { version = "0.5.4", features = ["x86_64-unix"] } +tfhe = { version = "0.5.5", features = ["x86_64-unix"] } ``` For Apple Silicon or aarch64-based machines running Unix-like OSes: ```toml -tfhe = { version = "0.5.4", features = ["aarch64-unix"] } +tfhe = { version = "0.5.5", features = ["aarch64-unix"] } ``` For `x86_64`-based machines with the [`rdseed instruction`](https://en.wikipedia.org/wiki/RDRAND) running Windows: ```toml -tfhe = { version = "0.5.4", features = ["x86_64"] } +tfhe = { version = "0.5.5", features = ["x86_64"] } ``` ### 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/getting_started/installation.md b/tfhe/docs/getting_started/installation.md index a81a23aa08..b6c5caff42 100644 --- a/tfhe/docs/getting_started/installation.md +++ b/tfhe/docs/getting_started/installation.md @@ -8,12 +8,12 @@ To use `TFHE-rs` in your project, you first need to add it as a dependency in yo If you are using an `x86` machine: ```toml -tfhe = { version = "0.5.4", features = [ "boolean", "shortint", "integer", "x86_64-unix" ] } +tfhe = { version = "0.5.5", features = [ "boolean", "shortint", "integer", "x86_64-unix" ] } ``` If you are using an `ARM` machine: ```toml -tfhe = { version = "0.5.4", features = [ "boolean", "shortint", "integer", "aarch64-unix" ] } +tfhe = { version = "0.5.5", features = [ "boolean", "shortint", "integer", "aarch64-unix" ] } ``` {% hint style="info" %} diff --git a/tfhe/docs/getting_started/quick_start.md b/tfhe/docs/getting_started/quick_start.md index 114a40b0cd..114021e79f 100644 --- a/tfhe/docs/getting_started/quick_start.md +++ b/tfhe/docs/getting_started/quick_start.md @@ -44,7 +44,7 @@ fn main() { The default configuration for x86 Unix machines: ```toml -tfhe = { version = "0.5.4", features = ["integer", "x86_64-unix"]} +tfhe = { version = "0.5.5", features = ["integer", "x86_64-unix"]} ``` Configuration options for different platforms can be found [here](../getting_started/installation.md). Other rust and homomorphic types features can be found [here](../how_to/rust_configuration.md). diff --git a/tfhe/docs/how_to/migrate_data.md b/tfhe/docs/how_to/migrate_data.md index 3baa674e5c..f911b8701d 100644 --- a/tfhe/docs/how_to/migrate_data.md +++ b/tfhe/docs/how_to/migrate_data.md @@ -1,6 +1,6 @@ # Managing Data Through Various TFHE-rs Versions -In what follows, the process to manage data when upgrading the TFHE-rs version (starting from the 0.5.4 release) is given. This page details the methods to make data, which have initially been generated with an older version of TFHE-rs, usable with a newer version. +In what follows, the process to manage data when upgrading the TFHE-rs version (starting from the 0.5.5 release) is given. This page details the methods to make data, which have initially been generated with an older version of TFHE-rs, usable with a newer version. ## Forward Compatibility Strategy @@ -18,12 +18,12 @@ To be able to use older serialized data with newer versions, the following is do In practice, if we take the 0.6 release as a concrete example, here is what will happen: - 0.6.0 is released with breaking changes to the serialization; -- 0.5.4 has tfhe@0.6.0 as optional dependency gated by the `forward_compatibility` feature; -- Conversion code is added to 0.5.4, if possible without any user input, but some data migration will likely require some information to be provided by the developer writing the migration code; -- 0.5.4 is released. +- 0.5.5 has tfhe@0.6.0 as optional dependency gated by the `forward_compatibility` feature; +- Conversion code is added to 0.5.5, if possible without any user input, but some data migration will likely require some information to be provided by the developer writing the migration code; +- 0.5.5 is released. {% hint style="info" %} -Note that if you do not need forward compatibility 0.5.4 will be equivalent to 0.5.3 from a usability perspective and you can safely update. +Note that if you do not need forward compatibility 0.5.5 will be equivalent to 0.5.3 from a usability perspective and you can safely update. Note also that the 0.6.0 has no knowledge of previous releases. {% endhint %} @@ -36,10 +36,10 @@ Examples to migrate data: An `Application` uses TFHE-rs 0.5.3 and needs/wants to upgrade to 0.6.0 to benefit from various improvements. Example timeline of the data migration or `Bulk Data Migration`: -- A new transition version of the `Application` is compiled with the 0.5.4 release of TFHE-rs; +- A new transition version of the `Application` is compiled with the 0.5.5 release of TFHE-rs; - The transition version of the `Application` adds code to read previously stored data, convert it to the proper format for 0.6.0 and save it back to disk; - The service enters a maintenance period (if relevant); -- Migration of data from 0.5.4 to 0.6.0 is done with the transition version of the `Application`, note that depending on the volume of data this transition can take a significant amount of time; +- Migration of data from 0.5.5 to 0.6.0 is done with the transition version of the `Application`, note that depending on the volume of data this transition can take a significant amount of time; - The updated version of the `Application` is compiled with the 0.6.0 release of TFHE-rs and put in production; - Service is resumed with the updated `Application` (if relevant). @@ -48,18 +48,18 @@ The above case is describing a simple use case, where only a single version of d In order to manage more complicated cases, another method called `Migrate On Read` can be used. Here is an example timeline where data is migrated only as needed with the `Migrate On Read` approach: -- A new version of the `Application` is compiled, it has tfhe@0.5.4 as dependency (the dependency will have to be renamed to avoid conflicts, a possible name is to use the major version like `tfhe_0_5`) and tfhe@0.6.0 which will not be renamed and can be accessed as `tfhe` +- A new version of the `Application` is compiled, it has tfhe@0.5.5 as dependency (the dependency will have to be renamed to avoid conflicts, a possible name is to use the major version like `tfhe_0_5`) and tfhe@0.6.0 which will not be renamed and can be accessed as `tfhe` - Code to manage reading the data is added to the `Application`: - The code determines whether the data was saved with the 0.5 `Application` or the 0.6 `Application`, if the data is already up to date with the 0.6 format it can be loaded right away, if it's in the 0.5 format the `Application` can check if an updated version of the data is already available in the 0.6 format and loads that if it's available, otherwise it converts the data to 0.6, saves the converted data to avoid having to convert it every time it is accessed and continue processing with the 0.6 data The above is more complicated to manage as data will be present on disk with several versions, however it allows to run the service continuously or near-continuously once the new `Application` is deployed (it will require careful routing or error handling as nodes with outdated `Application` won't be able to process the 0.6 data). Also, if required, several version of TFHE-rs can be "chained" to upgrade very old data to newer formats. -The above pattern can be extended to have `tfhe_0_5` (tfhe@0.5.4 renamed), `tfhe_0_6` (tfhe@0.6.0 renamed) and `tfhe` being tfhe@0.7.0, this will require special handling from the developers so that their protocol can handle data from 0.5.4, 0.6.0 and 0.7.0 using all the conversion tooling from the relevant version. +The above pattern can be extended to have `tfhe_0_5` (tfhe@0.5.5 renamed), `tfhe_0_6` (tfhe@0.6.0 renamed) and `tfhe` being tfhe@0.7.0, this will require special handling from the developers so that their protocol can handle data from 0.5.5, 0.6.0 and 0.7.0 using all the conversion tooling from the relevant version. -E.g., if some computation requires data from version 0.5.4 a conversion function could be called `upgrade_data_from_0_5_to_0_7` and do: +E.g., if some computation requires data from version 0.5.5 a conversion function could be called `upgrade_data_from_0_5_to_0_7` and do: -- read data from 0.5.4 +- read data from 0.5.5 - convert to 0.6.0 format using `tfhe_0_6` - convert to 0.7.0 format using `tfhe_0_7` - save to disk in 0.7.0 format diff --git a/tfhe/docs/how_to/run_on_gpu.md b/tfhe/docs/how_to/run_on_gpu.md index 15addad810..48bb35deea 100644 --- a/tfhe/docs/how_to/run_on_gpu.md +++ b/tfhe/docs/how_to/run_on_gpu.md @@ -13,12 +13,12 @@ To use the `TFHE-rs GPU backend` in your project, you first need to add it as a If you are using an `x86` machine: ```toml -tfhe = { version = "0.5.4", features = [ "boolean", "shortint", "integer", "x86_64-unix", "gpu" ] } +tfhe = { version = "0.5.5", features = [ "boolean", "shortint", "integer", "x86_64-unix", "gpu" ] } ``` If you are using an `ARM` machine: ```toml -tfhe = { version = "0.5.4", features = [ "boolean", "shortint", "integer", "aarch64-unix", "gpu" ] } +tfhe = { version = "0.5.5", features = [ "boolean", "shortint", "integer", "aarch64-unix", "gpu" ] } ``` diff --git a/tfhe/docs/how_to/serialization.md b/tfhe/docs/how_to/serialization.md index 1e17563824..1f5ff48c0b 100644 --- a/tfhe/docs/how_to/serialization.md +++ b/tfhe/docs/how_to/serialization.md @@ -11,7 +11,7 @@ To serialize our data, a [data format](https://serde.rs/#data-formats) should be [dependencies] # ... -tfhe = { version = "0.5.4", features = ["integer","x86_64-unix"]} +tfhe = { version = "0.5.5", features = ["integer","x86_64-unix"]} bincode = "1.3.3" ``` diff --git a/tfhe/docs/tutorials/ascii_fhe_string.md b/tfhe/docs/tutorials/ascii_fhe_string.md index 459863b75b..6d41eff026 100644 --- a/tfhe/docs/tutorials/ascii_fhe_string.md +++ b/tfhe/docs/tutorials/ascii_fhe_string.md @@ -24,7 +24,7 @@ To use the `FheUint8` type, the `integer` feature must be activated: [dependencies] # Default configuration for x86 Unix machines: -tfhe = { version = "0.5.4", features = ["integer", "x86_64-unix"]} +tfhe = { version = "0.5.5", features = ["integer", "x86_64-unix"]} ``` Other configurations can be found [here](../getting_started/installation.md). diff --git a/tfhe/docs/tutorials/parity_bit.md b/tfhe/docs/tutorials/parity_bit.md index 20d0d9baad..645c88eace 100644 --- a/tfhe/docs/tutorials/parity_bit.md +++ b/tfhe/docs/tutorials/parity_bit.md @@ -19,7 +19,7 @@ This function returns a Boolean that will be either `true` or `false` so that th # Cargo.toml # Default configuration for x86 Unix machines: -tfhe = { version = "0.5.4", features = ["integer", "x86_64-unix"]} +tfhe = { version = "0.5.5", features = ["integer", "x86_64-unix"]} ``` Other configurations can be found [here](../getting_started/installation.md).