Skip to content

Commit

Permalink
chore(all): update toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeul-zama committed Oct 3, 2024
1 parent 54a08af commit 795d9ac
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 16 deletions.
1 change: 0 additions & 1 deletion concrete-csprng/src/generators/implem/aesni/parallel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ impl ParallelRandomGenerator for AesniRandomGenerator {
}

#[cfg(test)]

mod test {
use crate::generators::aes_ctr::aes_ctr_parallel_generic_tests;
use crate::generators::implem::aesni::block_cipher::AesniBlockCipher;
Expand Down
4 changes: 2 additions & 2 deletions tfhe-zk-pok/src/curve_api/msm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn make_digits(a: &impl BigInteger, w: usize, num_bits: usize) -> impl Iterator<
} else {
num_bits
};
let digits_count = (num_bits + w - 1) / w;
let digits_count = num_bits.div_ceil(w) ;

(0..digits_count).map(move |i| {
// Construct a buffer of bits of the scalar, starting at `bit_offset`.
Expand Down Expand Up @@ -70,7 +70,7 @@ pub fn msm_wnaf_g1_446(
(size.ilog2() as usize * 69 / 100) + 2
};

let digits_count = (num_bits + c - 1) / c;
let digits_count = num_bits.div_ceil(c);
let scalar_digits = scalars
.into_par_iter()
.flat_map_iter(|s| make_digits(s, c, num_bits))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ impl<Scalar: UnsignedInteger + CastInto<usize> + CastFrom<usize>>
for ggsw_idx in 1..grouping_factor.ggsw_per_multi_bit_element().0 {
// We need to store the diff sums of more than one element as we store the
// individual modulus_switched elements
if ggsw_idx.count_ones() == 1 {
if ggsw_idx.is_power_of_two() {
continue;
}

Expand Down
2 changes: 0 additions & 2 deletions tfhe/src/high_level_api/integers/signed/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1695,8 +1695,6 @@ where
{
/// Performs a right bit rotation and assign operation on [FheInt]
///
/// # Note

/// # Example
///
/// ```rust
Expand Down
6 changes: 1 addition & 5 deletions tfhe/src/integer/server_key/comparator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,7 @@ impl<'a> Comparator<'a> {
.generate_lookup_table(|x| if x < message_modulus { x } else { 0 });

let rhs_lut = server_key.key.generate_lookup_table(|x| {
if x >= message_modulus {
x - message_modulus
} else {
0
}
x.saturating_sub(message_modulus)
});

Self {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2701,7 +2701,7 @@ where
let first_block_msg = first_block % block_msg_mod;
let first_block_carry = first_block / block_msg_mod;
assert_eq!(first_block_msg, (block_msg_mod - 1 + msg) % block_msg_mod);
assert_eq!(first_block_carry, (block_msg_mod - 1 + msg) / block_msg_mod);
assert_eq!(first_block_carry, msg.div_ceil(block_msg_mod));
for b in &ct.blocks[1..] {
let block = shortint_cks.decrypt_message_and_carry(b);
let msg = block % block_msg_mod;
Expand Down
2 changes: 1 addition & 1 deletion tfhe/src/shortint/parameters/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ pub const BIVARIATE_PBS_COMPLIANT_PARAMETER_SET_VEC: [ClassicPBSParameters; 16]
/// encoded over X (reps. Y) bits, i.e., message_modulus = 2^{X} (resp. carry_modulus = 2^{Y}).
/// All parameter sets guarantee 128-bits of security and an error probability smaller than
/// 2^{-40} for a PBS.

///
/// Return a parameter set from a message and carry moduli.
///
/// # Example
Expand Down
2 changes: 1 addition & 1 deletion tfhe/src/shortint/server_key/neg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ impl ServerKey {
pub fn is_neg_possible(&self, ct: CiphertextNoiseDegree) -> Result<(), CheckError> {
// z = ceil( degree / 2^p ) x 2^p
let msg_mod = self.message_modulus.0;
let mut z = (ct.degree.get() + msg_mod - 1) / msg_mod;
let mut z = ct.degree.get().div_ceil(msg_mod);
z = z.wrapping_mul(msg_mod);

self.max_degree.validate(Degree::new(z))
Expand Down
2 changes: 1 addition & 1 deletion tfhe/src/shortint/server_key/sub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ impl ServerKey {
) -> Result<(), CheckError> {
// z = ceil( degree / 2^p ) x 2^p
let msg_mod = self.message_modulus.0;
let mut z = (ct_right.degree.get() + msg_mod - 1) / msg_mod;
let mut z = ct_right.degree.get().div_ceil(msg_mod);
z = z.wrapping_mul(msg_mod);

let final_operation_count = ct_left.degree.get() + z;
Expand Down
2 changes: 1 addition & 1 deletion toolchain.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2024-09-06
nightly-2024-10-03

0 comments on commit 795d9ac

Please sign in to comment.