diff --git a/CHANGELOG.md b/CHANGELOG.md index a84de2c..9e63ebe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ Entries are listed in reverse chronological order. +## 3.0.0 + +* Update the `digest` dependency to `0.9`. This requires a major version + because the `digest` traits are part of the public API, but there are + otherwise no changes to the API. + ## 2.1.0 * Make `Scalar::from_bits` a `const fn`, allowing its use in `const` contexts. @@ -25,6 +31,12 @@ Entries are listed in reverse chronological order. The only significant change is the data model change to the `serde` feature; besides the `rand_core` version bump, there are no other user-visible changes. +## 1.2.4 + +* Specify a semver bound for `clear_on_drop` rather than an exact version, + addressing an issue where changes to inline assembly in rustc prevented + `clear_on_drop` from working without an update. + ## 1.2.3 * Fix an issue identified by a Quarkslab audit (and Jack Grigg), where manually diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..a802fde --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,8 @@ +# Code of Conduct + +We follow the [Rust Code of Conduct](http://www.rust-lang.org/conduct.html), +with the following additional clauses: + +* We respect the rights to privacy and anonymity for contributors and people in + the community. If someone wishes to contribute under a pseudonym different to + their primary identity, that wish is to be respected by all contributors. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 86622d4..d4e0ff8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,12 +17,3 @@ ask @isislovecruft or @hdevalence. Some issues are easier than others. The `easy` label can be used to find the easy issues. If you want to work on an issue, please leave a comment so that we can assign it to you! - -# Code of Conduct - -We follow the [Rust Code of Conduct](http://www.rust-lang.org/conduct.html), -with the following additional clauses: - -* We respect the rights to privacy and anonymity for contributors and people in - the community. If someone wishes to contribute under a pseudonym different to - their primary identity, that wish is to be respected by all contributors. diff --git a/Cargo.toml b/Cargo.toml index d73a932..c65b819 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ name = "curve25519-dalek" # - update CHANGELOG # - update html_root_url # - update README if required by semver -version = "2.1.0" +version = "3.0.0" authors = ["Isis Lovecruft ", "Henry de Valence "] readme = "README.md" @@ -30,7 +30,7 @@ features = ["nightly", "simd_backend"] travis-ci = { repository = "dalek-cryptography/curve25519-dalek", branch = "master"} [dev-dependencies] -sha2 = { version = "0.8", default-features = false } +sha2 = { version = "0.9", default-features = false } bincode = "1" criterion = "0.3.0" rand = "0.7" @@ -42,7 +42,7 @@ harness = false [dependencies] rand_core = { version = "0.5", default-features = false } byteorder = { version = "^1.2.3", default-features = false, features = ["i128"] } -digest = { version = "0.8", default-features = false } +digest = { version = "0.9", default-features = false } subtle = { version = "^2.2.1", default-features = false } serde = { version = "1.0", default-features = false, optional = true, features = ["derive"] } packed_simd = { version = "0.3", features = ["into_bits"], optional = true } diff --git a/README.md b/README.md index e3363f5..0f35b5a 100644 --- a/README.md +++ b/README.md @@ -45,9 +45,12 @@ make doc-internal To import `curve25519-dalek`, add the following to the dependencies section of your project's `Cargo.toml`: ```toml -curve25519-dalek = "2" +curve25519-dalek = "3" ``` +The `3.x` series has API almost entirely unchanged from the `2.x` series, +except that the `digest` version was updated. + The `2.x` series has API almost entirely unchanged from the `1.x` series, except that: diff --git a/src/edwards.rs b/src/edwards.rs index 810bc20..1524dbd 100644 --- a/src/edwards.rs +++ b/src/edwards.rs @@ -753,7 +753,7 @@ impl EdwardsPoint { pub struct EdwardsBasepointTable(pub(crate) [LookupTable; 32]); impl EdwardsBasepointTable { - /// The computation uses Pippeneger's algorithm, as described on + /// The computation uses Pippenger's algorithm, as described on /// page 13 of the Ed25519 paper. Write the scalar \\(a\\) in radix \\(16\\) with /// coefficients in \\([-8,8)\\), i.e., /// $$ diff --git a/src/lib.rs b/src/lib.rs index e1409a2..3d68c58 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,7 +22,7 @@ #![cfg_attr(feature = "nightly", doc(include = "../README.md"))] #![doc(html_logo_url = "https://doc.dalek.rs/assets/dalek-logo-clear.png")] -#![doc(html_root_url = "https://docs.rs/curve25519-dalek/2.1.0")] +#![doc(html_root_url = "https://docs.rs/curve25519-dalek/3.0.0")] //! Note that docs will only build on nightly Rust until //! [RFC 1990 stabilizes](https://github.com/rust-lang/rust/issues/44732). diff --git a/src/ristretto.rs b/src/ristretto.rs index 977f52f..93d310f 100644 --- a/src/ristretto.rs +++ b/src/ristretto.rs @@ -689,7 +689,7 @@ impl RistrettoPoint { where D: Digest + Default { let mut hash = D::default(); - hash.input(input); + hash.update(input); RistrettoPoint::from_hash(hash) } @@ -702,7 +702,7 @@ impl RistrettoPoint { where D: Digest + Default { // dealing with generic arrays is clumsy, until const generics land - let output = hash.result(); + let output = hash.finalize(); let mut output_bytes = [0u8; 64]; output_bytes.copy_from_slice(&output.as_slice()); diff --git a/src/scalar.rs b/src/scalar.rs index 87f5da9..6ead65a 100644 --- a/src/scalar.rs +++ b/src/scalar.rs @@ -102,8 +102,8 @@ //! //! // Streaming data into a hash object //! let mut hasher = Sha512::default(); -//! hasher.input(b"Abolish "); -//! hasher.input(b"ICE"); +//! hasher.update(b"Abolish "); +//! hasher.update(b"ICE"); //! let a2 = Scalar::from_hash(hasher); //! //! assert_eq!(a, a2); @@ -588,7 +588,7 @@ impl Scalar { where D: Digest + Default { let mut hash = D::default(); - hash.input(input); + hash.update(input); Scalar::from_hash(hash) } @@ -630,7 +630,7 @@ impl Scalar { where D: Digest { let mut output = [0u8; 64]; - output.copy_from_slice(hash.result().as_slice()); + output.copy_from_slice(hash.finalize().as_slice()); Scalar::from_bytes_mod_order_wide(&output) }