mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-04 20:24:10 +00:00
Fix two typos in FieldElement::invsqrt documentation.
This commit is contained in:
parent
353e3fe81a
commit
4270d4ff5f
1 changed files with 2 additions and 2 deletions
|
|
@ -255,7 +255,7 @@ impl FieldElement {
|
|||
(was_nonzero_square, r)
|
||||
}
|
||||
|
||||
/// Attempt to compute `1/sqrt(self)` in constant time.
|
||||
/// Attempt to compute `sqrt(1/self)` in constant time.
|
||||
///
|
||||
/// Convenience wrapper around `sqrt_ratio_i`.
|
||||
///
|
||||
|
|
@ -265,7 +265,7 @@ impl FieldElement {
|
|||
///
|
||||
/// - `(Choice(1), +sqrt(1/self)) ` if `self` is a nonzero square;
|
||||
/// - `(Choice(0), zero) ` if `self` is zero;
|
||||
/// - `(Choice(0), +sqrt(i*u/v)) ` if `self` is a nonzero nonsquare;
|
||||
/// - `(Choice(0), +sqrt(i/self)) ` if `self` is a nonzero nonsquare;
|
||||
///
|
||||
pub fn invsqrt(&self) -> (Choice, FieldElement) {
|
||||
FieldElement::sqrt_ratio_i(&FieldElement::one(), self)
|
||||
|
|
|
|||
Loading…
Reference in a new issue