diff --git a/src/modular/boxed_monty_form/add.rs b/src/modular/boxed_monty_form/add.rs index 7f9e583da..dac0a7355 100644 --- a/src/modular/boxed_monty_form/add.rs +++ b/src/modular/boxed_monty_form/add.rs @@ -1,4 +1,4 @@ -//! Additions between boxed Montgoemery form integers. +//! Additions between boxed Montgomery form integers. use super::BoxedMontyForm; use core::ops::{Add, AddAssign}; diff --git a/src/modular/boxed_monty_form/mul.rs b/src/modular/boxed_monty_form/mul.rs index 6501ddb7d..2100aeea0 100644 --- a/src/modular/boxed_monty_form/mul.rs +++ b/src/modular/boxed_monty_form/mul.rs @@ -367,7 +367,7 @@ pub(crate) const fn almost_montgomery_mul_by_one(z: &mut [Limb], x: &[Limb], m: conditional_sub(z, m, overflow); } -/// Calcaultes `z += x * y` and returns the carry. +/// Calculates `z += x * y` and returns the carry. #[inline] const fn add_mul_carry(z: &mut [Limb], x: &[Limb], y: Limb) -> Limb { let n = z.len(); @@ -384,7 +384,7 @@ const fn add_mul_carry(z: &mut [Limb], x: &[Limb], y: Limb) -> Limb { c } -/// Calcaultes `z = (z + x * y) / 2^W` and returns the carry (of the `z + x * y`). +/// Calculates `z = (z + x * y) / 2^W` and returns the carry (of the `z + x * y`). #[inline] const fn add_mul_carry_and_shift(z: &mut [Limb], x: &[Limb], y: Limb) -> Limb { let n = z.len(); diff --git a/src/uint/boxed/invert_mod.rs b/src/uint/boxed/invert_mod.rs index d97c3e293..c5c123fda 100644 --- a/src/uint/boxed/invert_mod.rs +++ b/src/uint/boxed/invert_mod.rs @@ -138,7 +138,7 @@ impl BoxedUint { (x, is_some) } - /// Computes the multiplicaitve inverse of `self` mod `modulus` + /// Computes the multiplicative inverse of `self` mod `modulus` /// /// `self` and `modulus` must have the same number of limbs, or the function will panic /// @@ -148,7 +148,7 @@ impl BoxedUint { self.invert_mod(modulus) } - /// Computes the multiplicaitve inverse of `self` mod `modulus` + /// Computes the multiplicative inverse of `self` mod `modulus` /// /// `self` and `modulus` must have the same number of limbs, or the function will panic ///