Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/modular/boxed_monty_form/add.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Additions between boxed Montgoemery form integers.
//! Additions between boxed Montgomery form integers.

use super::BoxedMontyForm;
use core::ops::{Add, AddAssign};
Expand Down
4 changes: 2 additions & 2 deletions src/modular/boxed_monty_form/mul.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions src/uint/boxed/invert_mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand All @@ -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
///
Expand Down