Merge branch 'release/3.0.0'

This commit is contained in:
Henry de Valence 2020-08-17 18:21:42 -07:00
commit b307c155c9
9 changed files with 35 additions and 21 deletions

View file

@ -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

8
CODE_OF_CONDUCT.md Normal file
View file

@ -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.

View file

@ -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.

View file

@ -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 <isis@patternsinthevoid.net>",
"Henry de Valence <hdevalence@hdevalence.ca>"]
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 }

View file

@ -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:

View file

@ -753,7 +753,7 @@ impl EdwardsPoint {
pub struct EdwardsBasepointTable(pub(crate) [LookupTable<AffineNielsPoint>; 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.,
/// $$

View file

@ -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).

View file

@ -689,7 +689,7 @@ impl RistrettoPoint {
where D: Digest<OutputSize = U64> + 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<OutputSize = U64> + 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());

View file

@ -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<OutputSize = U64> + 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<OutputSize = U64>
{
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)
}