From 2adc985f63658dad97bcf5b19e4cc5ce8c0e3f0d Mon Sep 17 00:00:00 2001 From: DebugSteven Date: Wed, 14 Nov 2018 14:43:11 -0500 Subject: [PATCH 1/4] default & identity trait for MontgomeryPoint --- src/montgomery.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/montgomery.rs b/src/montgomery.rs index d07e6af..49f7b98 100644 --- a/src/montgomery.rs +++ b/src/montgomery.rs @@ -76,6 +76,18 @@ impl ConstantTimeEq for MontgomeryPoint { } } +impl Default for MontgomeryPoint { + fn default() -> MontgomeryPoint { + MontgomeryPoint::identity() + } +} + +impl Identity for MontgomeryPoint { + fn identity() -> MontgomeryPoint { + EdwardsPoint::identity().to_montgomery() + } +} + impl PartialEq for MontgomeryPoint { fn eq(&self, other: &MontgomeryPoint) -> bool { self.ct_eq(other).unwrap_u8() == 1u8 From b5d6e94a647beff82110b853091c9a1579f03a93 Mon Sep 17 00:00:00 2001 From: Colt Frederickson Date: Wed, 17 Oct 2018 10:20:44 -0600 Subject: [PATCH 2/4] Build for 0.6.0 --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index dbf4a28..44b2997 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,7 @@ harness = false # match exactly, since the build.rs uses the crate itself as a library. [dependencies] -rand = { version = "0.5", default-features = false } +rand = { version = "0.6.0", default-features = false } byteorder = { version = "^1.2.3", default-features = false, features = ["i128"] } digest = { version = "0.8", default-features = false } clear_on_drop = "=0.2.3" @@ -50,7 +50,7 @@ serde = { version = "1.0", optional = true } packed_simd = { version = "0.3.0", features = ["into_bits"], optional = true } [build-dependencies] -rand = { version = "0.5", default-features = false } +rand = { version = "0.6.0", default-features = false } byteorder = { version = "^1.2.3", default-features = false, features = ["i128"] } digest = { version = "0.8", default-features = false } clear_on_drop = "=0.2.3" From 39145da396226516d8d1f663ad26f86bf04856db Mon Sep 17 00:00:00 2001 From: DebugSteven Date: Wed, 14 Nov 2018 23:16:50 -0500 Subject: [PATCH 3/4] implement default for MontgomeryPoint using zero byte array --- src/montgomery.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/montgomery.rs b/src/montgomery.rs index 49f7b98..da3c9a5 100644 --- a/src/montgomery.rs +++ b/src/montgomery.rs @@ -78,13 +78,7 @@ impl ConstantTimeEq for MontgomeryPoint { impl Default for MontgomeryPoint { fn default() -> MontgomeryPoint { - MontgomeryPoint::identity() - } -} - -impl Identity for MontgomeryPoint { - fn identity() -> MontgomeryPoint { - EdwardsPoint::identity().to_montgomery() + MontgomeryPoint([0u8; 32]) } } From 7f63eaec606e66641ebfdd66bb77301c70f4b815 Mon Sep 17 00:00:00 2001 From: Henry de Valence Date: Sun, 18 Nov 2018 10:44:30 -0800 Subject: [PATCH 4/4] Bump version to 1.0.0-pre.1 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 44b2997..4be6b1d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "curve25519-dalek" -version = "1.0.0-pre.0" +version = "1.0.0-pre.1" authors = ["Isis Lovecruft ", "Henry de Valence "] readme = "README.md"