diff --git a/tfhe-zk-pok/Cargo.toml b/tfhe-zk-pok/Cargo.toml index c431009407..aed0a17305 100644 --- a/tfhe-zk-pok/Cargo.toml +++ b/tfhe-zk-pok/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tfhe-zk-pok" -version = "0.1.0" +version = "0.1.1" edition = "2021" keywords = ["zero", "knowledge", "proof", "vector-commitments"] homepage = "https://zama.ai/" diff --git a/tfhe-zk-pok/src/proofs/pke.rs b/tfhe-zk-pok/src/proofs/pke.rs index d32aa0fb33..19c92a4dcd 100644 --- a/tfhe-zk-pok/src/proofs/pke.rs +++ b/tfhe-zk-pok/src/proofs/pke.rs @@ -295,7 +295,7 @@ pub fn prove( let x_bytes = &*[ q.to_le_bytes().as_slice(), - d.to_le_bytes().as_slice(), + (d as u64).to_le_bytes().as_slice(), b_i.to_le_bytes().as_slice(), t.to_le_bytes().as_slice(), &*a.iter().flat_map(|&x| x.to_le_bytes()).collect::>(), @@ -684,7 +684,7 @@ pub fn verify( let x_bytes = &*[ q.to_le_bytes().as_slice(), - d.to_le_bytes().as_slice(), + (d as u64).to_le_bytes().as_slice(), b_i.to_le_bytes().as_slice(), t.to_le_bytes().as_slice(), &*a.iter().flat_map(|&x| x.to_le_bytes()).collect::>(), diff --git a/tfhe-zk-pok/src/proofs/range.rs b/tfhe-zk-pok/src/proofs/range.rs index 499378f32c..03047c4d16 100644 --- a/tfhe-zk-pok/src/proofs/range.rs +++ b/tfhe-zk-pok/src/proofs/range.rs @@ -190,7 +190,7 @@ pub fn prove( G::Zp::hash( core::slice::from_mut(s), &[ - &i.to_le_bytes(), + &(i as u64).to_le_bytes(), v_hat.to_bytes().as_ref(), c_hat.to_bytes().as_ref(), c_y.to_bytes().as_ref(), @@ -286,7 +286,7 @@ pub fn verify( G::Zp::hash( core::slice::from_mut(s), &[ - &i.to_le_bytes(), + &(i as u64).to_le_bytes(), v_hat.to_bytes().as_ref(), c_hat.to_bytes().as_ref(), c_y.to_bytes().as_ref(), diff --git a/tfhe/Cargo.toml b/tfhe/Cargo.toml index 3371d6df30..d006f5b199 100644 --- a/tfhe/Cargo.toml +++ b/tfhe/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tfhe" -version = "0.6.4" +version = "0.6.5" edition = "2021" readme = "../README.md" keywords = ["fully", "homomorphic", "encryption", "fhe", "cryptography"] @@ -73,7 +73,7 @@ fs2 = { version = "0.4.3", optional = true } # While we wait for repeat_n in rust standard library itertools = "0.11.0" rand_core = { version = "0.6.4", features = ["std"] } -tfhe-zk-pok = { version = "0.1.0", path = "../tfhe-zk-pok", optional = true } +tfhe-zk-pok = { version = "0.1.1", path = "../tfhe-zk-pok", optional = true } tfhe-versionable = { version = "0.1.0", path = "../utils/tfhe-versionable" } # wasm deps diff --git a/tfhe/docs/fundamentals/serialization.md b/tfhe/docs/fundamentals/serialization.md index 079fc0d4b7..64e598fe10 100644 --- a/tfhe/docs/fundamentals/serialization.md +++ b/tfhe/docs/fundamentals/serialization.md @@ -15,7 +15,7 @@ Here is a full example: [dependencies] # ... -tfhe = { version = "0.6.4", features = ["integer","x86_64-unix"]} +tfhe = { version = "0.6.5", features = ["integer","x86_64-unix"]} bincode = "1.3.3" ``` diff --git a/tfhe/docs/getting_started/installation.md b/tfhe/docs/getting_started/installation.md index ccab8208c9..84397901e7 100644 --- a/tfhe/docs/getting_started/installation.md +++ b/tfhe/docs/getting_started/installation.md @@ -9,13 +9,13 @@ First, add **TFHE-rs** as a dependency in your `Cargo.toml`. **For `x86_64` machine running a Unix-like OS:** ```toml -tfhe = { version = "0.6.4", features = [ "boolean", "shortint", "integer", "x86_64-unix" ] } +tfhe = { version = "0.6.5", features = [ "boolean", "shortint", "integer", "x86_64-unix" ] } ``` **For `ARM` machine running a Unix-like OS:** ```toml -tfhe = { version = "0.6.4", features = [ "boolean", "shortint", "integer", "aarch64-unix" ] } +tfhe = { version = "0.6.5", features = [ "boolean", "shortint", "integer", "aarch64-unix" ] } ``` **For `x86_64` machines with the** [**`rdseed instruction`**](https://en.wikipedia.org/wiki/RDRAND) **running Windows:** diff --git a/tfhe/docs/getting_started/quick_start.md b/tfhe/docs/getting_started/quick_start.md index bcf37fd629..797a1fa6c0 100644 --- a/tfhe/docs/getting_started/quick_start.md +++ b/tfhe/docs/getting_started/quick_start.md @@ -47,7 +47,7 @@ fn main() { The default configuration for x86 Unix machines is as follows: ```toml -tfhe = { version = "0.6.4", features = ["integer", "x86_64-unix"]} +tfhe = { version = "0.6.5", features = ["integer", "x86_64-unix"]} ``` Refer to the [installation documentation](installation.md) for configuration options of different platforms.Learn more about homomorphic types features in the [configuration documentation.](../guides/rust\_configuration.md) diff --git a/tfhe/docs/guides/data_versioning.md b/tfhe/docs/guides/data_versioning.md index ccca5ee696..137fc52e61 100644 --- a/tfhe/docs/guides/data_versioning.md +++ b/tfhe/docs/guides/data_versioning.md @@ -2,7 +2,7 @@ This document explains how to save and load versioned data using the data versioning feature. -Starting from v0.6.4, **TFHE-rs** supports versioned data types. This allows you to store data and load it in the future without compatibility concerns. This feature is done by the `tfhe-versionable` crate. +Starting from v0.6.5, **TFHE-rs** supports versioned data types. This allows you to store data and load it in the future without compatibility concerns. This feature is done by the `tfhe-versionable` crate. This versioning scheme is compatible with all the [data formats](https://serde.rs/#data-formats) supported by serde. @@ -16,7 +16,7 @@ You can load serialized data with the `unversionize` function, even in newer ver [dependencies] # ... -tfhe = { version = "0.6.4", features = ["integer","x86_64-unix"]} +tfhe = { version = "0.6.5", features = ["integer","x86_64-unix"]} tfhe-versionable = "0.1.0" bincode = "1.3.3" ``` diff --git a/tfhe/docs/guides/run_on_gpu.md b/tfhe/docs/guides/run_on_gpu.md index 61a039e7ff..6b4570970e 100644 --- a/tfhe/docs/guides/run_on_gpu.md +++ b/tfhe/docs/guides/run_on_gpu.md @@ -19,13 +19,13 @@ To use the **TFHE-rs** GPU backend in your project, add the following dependency If you are using an `x86` machine: ```toml -tfhe = { version = "0.6.4", features = [ "boolean", "shortint", "integer", "x86_64-unix", "gpu" ] } +tfhe = { version = "0.6.5", features = [ "boolean", "shortint", "integer", "x86_64-unix", "gpu" ] } ``` If you are using an `ARM` machine: ```toml -tfhe = { version = "0.6.4", features = [ "boolean", "shortint", "integer", "aarch64-unix", "gpu" ] } +tfhe = { version = "0.6.5", features = [ "boolean", "shortint", "integer", "aarch64-unix", "gpu" ] } ``` {% hint style="success" %} diff --git a/tfhe/docs/references/core-crypto-api/tutorial.md b/tfhe/docs/references/core-crypto-api/tutorial.md index 1346937553..4a0c9d990f 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.6.4", features = [ "x86_64-unix" ] } +tfhe = { version = "0.6.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.6.4", features = ["x86_64-unix"] } +tfhe = { version = "0.6.5", features = ["x86_64-unix"] } ``` For Apple Silicon or aarch64-based machines running Unix-like OSes: ```toml -tfhe = { version = "0.6.4", features = ["aarch64-unix"] } +tfhe = { version = "0.6.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.6.4", features = ["x86_64"] } +tfhe = { version = "0.6.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/tutorials/ascii_fhe_string.md b/tfhe/docs/tutorials/ascii_fhe_string.md index fbf6d22ac8..a9b2200390 100644 --- a/tfhe/docs/tutorials/ascii_fhe_string.md +++ b/tfhe/docs/tutorials/ascii_fhe_string.md @@ -25,7 +25,7 @@ To use the `FheUint8` type, enable the `integer` feature: [dependencies] # Default configuration for x86 Unix machines: -tfhe = { version = "0.6.4", features = ["integer", "x86_64-unix"]} +tfhe = { version = "0.6.5", features = ["integer", "x86_64-unix"]} ``` Refer to the [installation guide](../getting\_started/installation.md) for other configurations. diff --git a/tfhe/docs/tutorials/parity_bit.md b/tfhe/docs/tutorials/parity_bit.md index c4c9ceadb8..53ae342cf3 100644 --- a/tfhe/docs/tutorials/parity_bit.md +++ b/tfhe/docs/tutorials/parity_bit.md @@ -18,7 +18,7 @@ This function returns a Boolean (`true` or `false`) so that the total count of ` # Cargo.toml # Default configuration for x86 Unix machines: -tfhe = { version = "0.6.4", features = ["integer", "x86_64-unix"]} +tfhe = { version = "0.6.5", features = ["integer", "x86_64-unix"]} ``` Refer to the [installation](../getting\_started/installation.md) for other configurations.