diff --git a/Cargo.toml b/Cargo.toml index 5bdd3bc..f2f6534 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "curve25519-dalek" -version = "0.7.1" +version = "0.8.0" authors = ["Isis Lovecruft ", "Henry de Valence "] readme = "README.md" diff --git a/README.md b/README.md index ecd519f..7258558 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Extensive documentation is available [here](https://docs.rs/curve25519-dalek). To install, add the following to the dependencies section of your project's `Cargo.toml`: - curve25519-dalek = "^0.7" + curve25519-dalek = "^0.8" Then, in your library or executable source, add: diff --git a/src/curve.rs b/src/curve.rs index 870d82d..a9387a6 100644 --- a/src/curve.rs +++ b/src/curve.rs @@ -87,8 +87,6 @@ use core::ops::{Mul, MulAssign}; use core::ops::Index; use constants; -#[cfg(feature = "yolocrypto")] -use decaf::DecafPoint; use field::FieldElement; use scalar::Scalar; use subtle::arrays_equal_ct; @@ -897,16 +895,6 @@ impl<'a, 'b> Mul<&'b ExtendedPoint> for &'a Scalar { } } -#[cfg(feature = "yolocrypto")] -impl<'a, 'b> Mul<&'b DecafPoint> for &'a Scalar { - type Output = DecafPoint; - - /// Scalar multiplication: compute `self * scalar`. - fn mul(self, point: &'b DecafPoint) -> DecafPoint { - DecafPoint(self * &point.0) - } -} - /// Precomputation #[derive(Clone)] @@ -1664,7 +1652,7 @@ mod bench { use test::Bencher; use constants; use super::*; - use super::test::{A_SCALAR, A_TIMES_BASEPOINT, B_SCALAR}; + use super::test::{A_SCALAR}; #[bench] fn basepoint_mult(b: &mut Bencher) { diff --git a/src/decaf.rs b/src/decaf.rs index 07c24c6..a97347f 100644 --- a/src/decaf.rs +++ b/src/decaf.rs @@ -458,6 +458,16 @@ impl<'a, 'b> Mul<&'b Scalar> for &'a DecafPoint { } } +impl<'a, 'b> Mul<&'b DecafPoint> for &'a Scalar { + type Output = DecafPoint; + + /// Scalar multiplication: compute `self * scalar`. + fn mul(self, point: &'b DecafPoint) -> DecafPoint { + DecafPoint(self * &point.0) + } +} + + /// Precomputation #[derive(Clone)] pub struct DecafBasepointTable(pub EdwardsBasepointTable); @@ -576,7 +586,6 @@ mod test { use scalar::Scalar; use constants; use curve::CompressedEdwardsY; - use curve::ExtendedPoint; use curve::Identity; use super::*; @@ -662,7 +671,7 @@ mod test { // Check that P is on the curve assert!(P.0.is_valid()); // Check that P is in the image of the decaf map - let compressed_P = P.compress(); + P.compress(); } } }