Skip to content

Commit

Permalink
Merge pull request #112 from Pratyush/patch-1
Browse files Browse the repository at this point in the history
Small typo fix in `ff-derive`
  • Loading branch information
str4d authored Mar 9, 2025
2 parents 9d24f8c + c7ab0cc commit c38e473
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ and this library adheres to Rust's notion of
### Changed
- MSRV is now 1.44.0.
- `ff::Field::random<R: RngCore + ?Sized>(rng: &mut R) -> Self` has been changed
to `Field::random(rng: impl RngCore) -> Self`, to aligh with
to `Field::random(rng: impl RngCore) -> Self`, to align with
`group::Group::random`.

### Removed
Expand Down
4 changes: 2 additions & 2 deletions ff_derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ fn prime_field_constants_and_sqrt(
let bytes = limbs * 8;
let modulus_num_bits = biguint_num_bits(modulus.clone());

// The number of bits we should "shave" from a randomly sampled reputation, i.e.,
// The number of bits we should "shave" from a randomly sampled representation, i.e.,
// if our modulus is 381 bits and our representation is 384 bits, we should shave
// 3 bits from the beginning of a randomly sampled 384 bit representation to
// reduce the cost of rejection sampling.
Expand Down Expand Up @@ -1381,7 +1381,7 @@ fn prime_field_impl(
}

/// Subtracts the modulus from this element if this element is not in the
/// field. Only used interally.
/// field. Only used internally.
#[inline(always)]
fn reduce(&mut self) {
if !self.is_valid() {
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ pub trait PrimeField: Field + From<u64> {
pub trait WithSmallOrderMulGroup<const N: u8>: PrimeField {
/// A field element of small multiplicative order $N$.
///
/// The presense of this element allows you to perform (certain types of)
/// The presence of this element allows you to perform (certain types of)
/// endomorphisms on some elliptic curves.
///
/// It can be calculated using [SageMath] as
Expand Down

0 comments on commit c38e473

Please sign in to comment.