Merge branch 'develop' into next

This is an initial resolution of conflicts which does not work.
This commit is contained in:
Luke Parker
2025-01-30 00:56:29 -05:00
128 changed files with 1835 additions and 44261 deletions

View File

@@ -161,7 +161,16 @@ macro_rules! field {
res *= res;
}
}
res *= table[usize::from(bits)];
let mut scale_by = $FieldName(Residue::ONE);
#[allow(clippy::needless_range_loop)]
for i in 0 .. 16 {
#[allow(clippy::cast_possible_truncation)] // Safe since 0 .. 16
{
scale_by = <_>::conditional_select(&scale_by, &table[i], bits.ct_eq(&(i as u8)));
}
}
res *= scale_by;
bits = 0;
}
}

View File

@@ -242,7 +242,16 @@ impl Mul<Scalar> for Point {
res = res.double();
}
}
res += table[usize::from(bits)];
let mut add_by = Point::identity();
#[allow(clippy::needless_range_loop)]
for i in 0 .. 16 {
#[allow(clippy::cast_possible_truncation)] // Safe since 0 .. 16
{
add_by = <_>::conditional_select(&add_by, &table[i], bits.ct_eq(&(i as u8)));
}
}
res += add_by;
bits = 0;
}
}