diff --git a/Cargo.toml b/Cargo.toml index dbf4a28..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" @@ -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" diff --git a/src/montgomery.rs b/src/montgomery.rs index d07e6af..da3c9a5 100644 --- a/src/montgomery.rs +++ b/src/montgomery.rs @@ -76,6 +76,12 @@ impl ConstantTimeEq for MontgomeryPoint { } } +impl Default for MontgomeryPoint { + fn default() -> MontgomeryPoint { + MontgomeryPoint([0u8; 32]) + } +} + impl PartialEq for MontgomeryPoint { fn eq(&self, other: &MontgomeryPoint) -> bool { self.ct_eq(other).unwrap_u8() == 1u8