mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-04 20:24:10 +00:00
Demote a docstring note to inline code comment to avoid confusing users.
This commit is contained in:
parent
cfd0e8ad6e
commit
2c83d48cfa
1 changed files with 1 additions and 5 deletions
|
|
@ -210,15 +210,11 @@ impl CompressedMontgomeryU {
|
|||
/// Given a Montgomery `u` coordinate, compute an Edwards `y` via
|
||||
/// `y = (u-1)/(u+1)`.
|
||||
///
|
||||
/// # Note
|
||||
///
|
||||
/// Since `u = (1+y)/(1-y)` and `v = √(u(u²+Au+1))`, we can see that
|
||||
/// `y = (u-1)/(u+1)`.
|
||||
///
|
||||
/// # Return
|
||||
///
|
||||
/// A `FieldElement` corresponding to this coordinate, but in Edwards form.
|
||||
fn to_edwards_y(u: &FieldElement) -> FieldElement {
|
||||
// Since `u = (1+y)/(1-y)` and `v = √(u(u²+Au+1))`, so `y = (u-1)/(u+1)`.
|
||||
&(u - &FieldElement::one()) * &(u + &FieldElement::one()).invert()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue