Skip to content

Commit

Permalink
fix: fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
rex4539 committed Feb 25, 2024
1 parent 9fff22c commit 2dc1ab8
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion script/bn256.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file generates the montogomary form integers for x in [0, 2^16) \intersect
# This file generates the montgomery form integers for x in [0, 2^16) \intersect
# BN::ScalarField

verbose = False
Expand Down
2 changes: 1 addition & 1 deletion src/bn256/fq2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ impl Fq2 {
}
}

// conjucate by negating c1
// conjugate by negating c1
pub fn conjugate(&mut self) {
self.c1 = -self.c1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ff_ext/jacobi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ fn jacobinary(mut n: u64, mut d: u64, mut t: u64) -> i64 {
/// - M. Hamburg, "Computing the Jacobi symbol using Bernstein-Yang",
/// https://eprint.iacr.org/2021/1271.pdf
pub fn jacobi<const L: usize>(n: &[u64], d: &[u64]) -> i64 {
// Instead of the variable "j" taking the values from {-1, 1} and satysfying
// Instead of the variable "j" taking the values from {-1, 1} and satisfying
// at the end of the outer loop iteration the equation J = "j" * ("n" / |"d"|)
// for the modified Jacobi symbol ("n" / |"d"|) and the sought Jacobi symbol J,
// we store the sign bit of "j" in the second-lowest bit of "t" for optimization
Expand Down
2 changes: 1 addition & 1 deletion src/pluto_eris/fields/fp2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ impl Fp2 {

/// Norm of Fp2 as extension field in u over Fp
fn norm(&self) -> Fp {
// norm = self * self.cojungate()
// norm = self * self.conjugate()
let t0 = self.c0.square();
let t1 = self.c1.square() * U_SQUARE;
t1 - t0
Expand Down
2 changes: 1 addition & 1 deletion src/pluto_eris/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! # `Pluto\Eris half-pairing ccyle`
//! # `Pluto\Eris half-pairing cycle`
//!
//! Implementation of the Pluto / Eris half-pairing cycle of prime order elliptic curves.
//!
Expand Down
2 changes: 1 addition & 1 deletion src/secp256k1/fp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const MODULUS_LIMBS_32: [u32; 8] = [
0xffff_ffff,
];

/// Constant representing the modolus as static str
/// Constant representing the modulus as static str
const MODULUS_STR: &str = "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f";

/// INV = -(p^{-1} mod 2^64) mod 2^64
Expand Down
2 changes: 1 addition & 1 deletion src/secp256r1/fp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const MODULUS_LIMBS_32: [u32; 8] = [
0xffff_ffff,
];

/// Constant representing the modolus as static str
/// Constant representing the modulus as static str
const MODULUS_STR: &str = "0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff";

/// INV = -(p^{-1} mod 2^64) mod 2^64
Expand Down
2 changes: 1 addition & 1 deletion src/secp256r1/fq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ impl ff::PrimeField for Fq {
// of 0xffff...ffff. Otherwise, it'll be zero.
let is_some = (borrow as u8) & 1;

// Convert to Montgomery form by computi
// Convert to Montgomery form by computing
// (a.R^0 * R^2) / R = a.R
tmp *= &R2;

Expand Down
2 changes: 1 addition & 1 deletion src/tests/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ macro_rules! field_testing_suite {

for _ in 0..n {
let mut a = F::random(&mut rng);
let b = a.invert().unwrap(); // probablistically nonzero
let b = a.invert().unwrap(); // probabilistically nonzero
a.mul_assign(&b);

assert_eq!(a, F::ONE);
Expand Down

0 comments on commit 2dc1ab8

Please sign in to comment.