mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-07 20:50:39 +00:00
Merge branch 'release/3.0.0'
This commit is contained in:
commit
b307c155c9
9 changed files with 35 additions and 21 deletions
12
CHANGELOG.md
12
CHANGELOG.md
|
|
@ -2,6 +2,12 @@
|
||||||
|
|
||||||
Entries are listed in reverse chronological order.
|
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
|
## 2.1.0
|
||||||
|
|
||||||
* Make `Scalar::from_bits` a `const fn`, allowing its use in `const` contexts.
|
* 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;
|
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.
|
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
|
## 1.2.3
|
||||||
|
|
||||||
* Fix an issue identified by a Quarkslab audit (and Jack Grigg), where manually
|
* Fix an issue identified by a Quarkslab audit (and Jack Grigg), where manually
|
||||||
|
|
|
||||||
8
CODE_OF_CONDUCT.md
Normal file
8
CODE_OF_CONDUCT.md
Normal 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.
|
||||||
|
|
@ -17,12 +17,3 @@ ask @isislovecruft or @hdevalence.
|
||||||
Some issues are easier than others. The `easy` label can be used to find the
|
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
|
easy issues. If you want to work on an issue, please leave a comment so that we
|
||||||
can assign it to you!
|
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.
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ name = "curve25519-dalek"
|
||||||
# - update CHANGELOG
|
# - update CHANGELOG
|
||||||
# - update html_root_url
|
# - update html_root_url
|
||||||
# - update README if required by semver
|
# - update README if required by semver
|
||||||
version = "2.1.0"
|
version = "3.0.0"
|
||||||
authors = ["Isis Lovecruft <isis@patternsinthevoid.net>",
|
authors = ["Isis Lovecruft <isis@patternsinthevoid.net>",
|
||||||
"Henry de Valence <hdevalence@hdevalence.ca>"]
|
"Henry de Valence <hdevalence@hdevalence.ca>"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
@ -30,7 +30,7 @@ features = ["nightly", "simd_backend"]
|
||||||
travis-ci = { repository = "dalek-cryptography/curve25519-dalek", branch = "master"}
|
travis-ci = { repository = "dalek-cryptography/curve25519-dalek", branch = "master"}
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
sha2 = { version = "0.8", default-features = false }
|
sha2 = { version = "0.9", default-features = false }
|
||||||
bincode = "1"
|
bincode = "1"
|
||||||
criterion = "0.3.0"
|
criterion = "0.3.0"
|
||||||
rand = "0.7"
|
rand = "0.7"
|
||||||
|
|
@ -42,7 +42,7 @@ harness = false
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rand_core = { version = "0.5", default-features = false }
|
rand_core = { version = "0.5", default-features = false }
|
||||||
byteorder = { version = "^1.2.3", default-features = false, features = ["i128"] }
|
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 }
|
subtle = { version = "^2.2.1", default-features = false }
|
||||||
serde = { version = "1.0", default-features = false, optional = true, features = ["derive"] }
|
serde = { version = "1.0", default-features = false, optional = true, features = ["derive"] }
|
||||||
packed_simd = { version = "0.3", features = ["into_bits"], optional = true }
|
packed_simd = { version = "0.3", features = ["into_bits"], optional = true }
|
||||||
|
|
|
||||||
|
|
@ -45,9 +45,12 @@ make doc-internal
|
||||||
To import `curve25519-dalek`, add the following to the dependencies section of
|
To import `curve25519-dalek`, add the following to the dependencies section of
|
||||||
your project's `Cargo.toml`:
|
your project's `Cargo.toml`:
|
||||||
```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,
|
The `2.x` series has API almost entirely unchanged from the `1.x` series,
|
||||||
except that:
|
except that:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -753,7 +753,7 @@ impl EdwardsPoint {
|
||||||
pub struct EdwardsBasepointTable(pub(crate) [LookupTable<AffineNielsPoint>; 32]);
|
pub struct EdwardsBasepointTable(pub(crate) [LookupTable<AffineNielsPoint>; 32]);
|
||||||
|
|
||||||
impl EdwardsBasepointTable {
|
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
|
/// page 13 of the Ed25519 paper. Write the scalar \\(a\\) in radix \\(16\\) with
|
||||||
/// coefficients in \\([-8,8)\\), i.e.,
|
/// coefficients in \\([-8,8)\\), i.e.,
|
||||||
/// $$
|
/// $$
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#![cfg_attr(feature = "nightly", doc(include = "../README.md"))]
|
#![cfg_attr(feature = "nightly", doc(include = "../README.md"))]
|
||||||
#![doc(html_logo_url = "https://doc.dalek.rs/assets/dalek-logo-clear.png")]
|
#![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
|
//! Note that docs will only build on nightly Rust until
|
||||||
//! [RFC 1990 stabilizes](https://github.com/rust-lang/rust/issues/44732).
|
//! [RFC 1990 stabilizes](https://github.com/rust-lang/rust/issues/44732).
|
||||||
|
|
|
||||||
|
|
@ -689,7 +689,7 @@ impl RistrettoPoint {
|
||||||
where D: Digest<OutputSize = U64> + Default
|
where D: Digest<OutputSize = U64> + Default
|
||||||
{
|
{
|
||||||
let mut hash = D::default();
|
let mut hash = D::default();
|
||||||
hash.input(input);
|
hash.update(input);
|
||||||
RistrettoPoint::from_hash(hash)
|
RistrettoPoint::from_hash(hash)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -702,7 +702,7 @@ impl RistrettoPoint {
|
||||||
where D: Digest<OutputSize = U64> + Default
|
where D: Digest<OutputSize = U64> + Default
|
||||||
{
|
{
|
||||||
// dealing with generic arrays is clumsy, until const generics land
|
// dealing with generic arrays is clumsy, until const generics land
|
||||||
let output = hash.result();
|
let output = hash.finalize();
|
||||||
let mut output_bytes = [0u8; 64];
|
let mut output_bytes = [0u8; 64];
|
||||||
output_bytes.copy_from_slice(&output.as_slice());
|
output_bytes.copy_from_slice(&output.as_slice());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,8 +102,8 @@
|
||||||
//!
|
//!
|
||||||
//! // Streaming data into a hash object
|
//! // Streaming data into a hash object
|
||||||
//! let mut hasher = Sha512::default();
|
//! let mut hasher = Sha512::default();
|
||||||
//! hasher.input(b"Abolish ");
|
//! hasher.update(b"Abolish ");
|
||||||
//! hasher.input(b"ICE");
|
//! hasher.update(b"ICE");
|
||||||
//! let a2 = Scalar::from_hash(hasher);
|
//! let a2 = Scalar::from_hash(hasher);
|
||||||
//!
|
//!
|
||||||
//! assert_eq!(a, a2);
|
//! assert_eq!(a, a2);
|
||||||
|
|
@ -588,7 +588,7 @@ impl Scalar {
|
||||||
where D: Digest<OutputSize = U64> + Default
|
where D: Digest<OutputSize = U64> + Default
|
||||||
{
|
{
|
||||||
let mut hash = D::default();
|
let mut hash = D::default();
|
||||||
hash.input(input);
|
hash.update(input);
|
||||||
Scalar::from_hash(hash)
|
Scalar::from_hash(hash)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -630,7 +630,7 @@ impl Scalar {
|
||||||
where D: Digest<OutputSize = U64>
|
where D: Digest<OutputSize = U64>
|
||||||
{
|
{
|
||||||
let mut output = [0u8; 64];
|
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)
|
Scalar::from_bytes_mod_order_wide(&output)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue