diff --git a/src/msm.rs b/src/msm.rs index 6cac2e23..d502e815 100644 --- a/src/msm.rs +++ b/src/msm.rs @@ -496,7 +496,7 @@ pub fn msm_best(coeffs: &[C::Scalar], bases: &[C]) -> C::Curve { // number of windows let number_of_windows = C::Scalar::NUM_BITS as usize / c + 1; - // accumumator for each window + // accumulator for each window let mut acc = vec![C::Curve::identity(); number_of_windows]; acc.par_iter_mut().enumerate().rev().for_each(|(w, acc)| { // jacobian buckets for already scheduled points diff --git a/src/serde.rs b/src/serde.rs index 720bd134..66705ece 100644 --- a/src/serde.rs +++ b/src/serde.rs @@ -259,7 +259,7 @@ where } } - fn pos_idetity() -> Option { + fn pos_identity() -> Option { match Self::CONFIG { CompressedFlagConfig::Extra => Some(1), CompressedFlagConfig::SingleSpare => None, @@ -281,7 +281,7 @@ where } fn set_identity(&mut self, c: &C) { - if let Some(pos) = Self::pos_idetity() { + if let Some(pos) = Self::pos_identity() { Flag::set(pos, bool::from(c.is_identity()), self.flag_byte()); }; } @@ -295,7 +295,7 @@ where } fn get_is_identity(&mut self) -> Option { - Self::pos_idetity().map(|pos| Flag::get(pos, self.flag_byte())) + Self::pos_identity().map(|pos| Flag::get(pos, self.flag_byte())) } fn set_flags(&mut self, c: &C) { @@ -367,7 +367,7 @@ where (is_valid, is_identity) } - // identitity flag inactive + // identity flag inactive None => (subtle::Choice::from(1u8), is_zero), }; diff --git a/src/tests/field/arith.rs b/src/tests/field/arith.rs index 968d503c..6f39203d 100644 --- a/src/tests/field/arith.rs +++ b/src/tests/field/arith.rs @@ -204,7 +204,7 @@ macro_rules! arith_test { }; } -// This test is autside the `arith_test` macro since it is only +// This test is outside the `arith_test` macro since it is only // implemented for prime fields and quadratic extensions. pub(crate) fn sqrt_test(mut rng: impl RngCore, n: usize) { for _ in 0..n {