mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-04 20:24:10 +00:00
Remove port of Montgomery conversion from Adam's code
This should be brought back later as part of reworking the compressed point formats / serialization code. Right now there's just "CompressedPoint" which is in the ed25519 format. Ideally, users should be able to serialize points to formats used for X25519, for decaf, etc. and not have to worry too much about the internal model.
This commit is contained in:
parent
b5eee15f50
commit
71bf0d5e53
2 changed files with 1 additions and 9 deletions
|
|
@ -53,6 +53,7 @@ Then, in your library or executable source, add:
|
|||
## TODO
|
||||
|
||||
* Implement hashing to a point on the curve (Elligator).
|
||||
* 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.
|
||||
|
|
|
|||
|
|
@ -372,15 +372,6 @@ impl ExtendedPoint {
|
|||
pub fn compress(&self) -> CompressedPoint {
|
||||
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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue