mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-07 20:50:39 +00:00
Merge remote-tracking branch 'hdevalence/master'
This commit is contained in:
commit
9630b91a03
2 changed files with 13 additions and 14 deletions
18
README.md
18
README.md
|
|
@ -18,9 +18,9 @@ universe's beauty, but also his deep hatred of the Daleks. Rusty destroys the
|
||||||
other Daleks and departs the ship, determined to track down and bring an end
|
other Daleks and departs the ship, determined to track down and bring an end
|
||||||
to the Dalek race.*
|
to the Dalek race.*
|
||||||
|
|
||||||
Significant portions of this code are ported from
|
Significant portions of this code are ported from [Adam Langley's
|
||||||
[Adam Langley's Golang ed25519 library](https://github.com/agl/ed25519), along
|
Golang ed25519 library](https://github.com/agl/ed25519), which is in
|
||||||
with referencing the ref10 implementation.
|
turn a port of the reference `ref10` implementation.
|
||||||
|
|
||||||
## Warning
|
## Warning
|
||||||
|
|
||||||
|
|
@ -52,5 +52,13 @@ Then, in your library or executable source, add:
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
* Implement hashing to a point on the curve.
|
* Implement hashing to a point on the curve (Elligator).
|
||||||
* Maybe implement Mike Hamburg's Decaf point compression format.
|
* Add conversion to Montgomery form and rework compressed point types.
|
||||||
|
* Maybe implement Mike Hamburg's Decaf point compression format, so that
|
||||||
|
users can be guaranteed to be in a prime-order subgroup and not have to
|
||||||
|
worry about cofactors.
|
||||||
|
* Review finite field arithmetic.
|
||||||
|
* Review scalar arithmetic.
|
||||||
|
* Review addition formulas.
|
||||||
|
* Proofread mathematics in documentation.
|
||||||
|
* Maybe use serde for serialization.
|
||||||
|
|
|
||||||
|
|
@ -372,15 +372,6 @@ impl ExtendedPoint {
|
||||||
pub fn compress(&self) -> CompressedPoint {
|
pub fn compress(&self) -> CompressedPoint {
|
||||||
self.to_projective().compress()
|
self.to_projective().compress()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// XXX rewrite
|
|
||||||
/// We only need the x-coordinate of the curve25519 point, which I'll
|
|
||||||
/// call u. The isomorphism is u=(y+1)/(1-y), since y=Y/Z, this gives
|
|
||||||
/// u=(Y+Z)/(Z-Y). We know that Z=1, thus u=(Y+1)/(1-Y).
|
|
||||||
pub fn edwards_to_montgomery_x(&self) -> FieldElement { // edwardsToMontgomeryX
|
|
||||||
let one = FieldElement::one();
|
|
||||||
&((&one - &self.Y).invert()) * &(&self.Y + &one)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CompletedPoint {
|
impl CompletedPoint {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue