Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bumped MSRV to 1.56.1 and added some documentation about semver #218

Merged
merged 2 commits into from
Oct 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ jobs:
args: --features "batch_deterministic"

msrv:
name: Current MSRV is 1.41
name: Current MSRV is 1.56.1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.41
toolchain: 1.56.1
override: true
- uses: actions-rs/cargo@v1
with:
Expand All @@ -128,4 +128,4 @@ jobs:
with:
command: bench
# This filter selects no benchmarks, so we don't run any, only build them.
args: --features "batch" "DONTRUNBENCHMARKS"
args: --features "batch" "nonexistentbenchmark"
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Changes
* Bumped MSRV from 1.41 to 1.56.1
* Removed `ExpandedSecretKey` API ((#205)[https://github.com/dalek-cryptography/ed25519-dalek/pull/205])
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "ed25519-dalek"
version = "1.0.1"
edition = "2018"
edition = "2021"
authors = ["isis lovecruft <[email protected]>"]
readme = "README.md"
license = "BSD-3-Clause"
Expand Down Expand Up @@ -30,7 +30,7 @@ rand_core = { version = "0.5", default-features = false, optional = true }
serde_crate = { package = "serde", version = "1.0", default-features = false, optional = true }
serde_bytes = { version = "0.11", optional = true }
sha2 = { version = "0.9", default-features = false }
zeroize = { version = "~1.3", default-features = false }
zeroize = { version = "1", default-features = false }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, would love a release with this change!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


[dev-dependencies]
hex = "^0.4"
Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ Documentation is available [here](https://docs.rs/ed25519-dalek).

To install, add the following to your project's `Cargo.toml`:

```toml
[dependencies.ed25519-dalek]
version = "1"
```
# Minimum Supported Rust Version

This crate requires Rust 1.56.1 at a minimum. 1.x releases of this crate supported an MSRV of 1.41.

In the future, MSRV changes will be accompanied by a minor version bump.

# Changelog

See [CHANGELOG.md](CHANGELOG.md) for a list of changes made in past version of this crate.

# Benchmarks

Expand Down
20 changes: 9 additions & 11 deletions benches/ed25519_benchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ mod ed25519_benches {
use ed25519_dalek::PublicKey;
use ed25519_dalek::Signature;
use ed25519_dalek::Signer;
use ed25519_dalek::verify_batch;
use rand::thread_rng;
use rand::prelude::ThreadRng;
use rand::thread_rng;

fn sign(c: &mut Criterion) {
let mut csprng: ThreadRng = thread_rng();
Expand All @@ -38,9 +37,9 @@ mod ed25519_benches {
let keypair: Keypair = Keypair::generate(&mut csprng);
let msg: &[u8] = b"";
let sig: Signature = keypair.sign(msg);

c.bench_function("Ed25519 signature verification", move |b| {
b.iter(| | keypair.verify(msg, &sig))
b.iter(|| keypair.verify(msg, &sig))
});
}

Expand All @@ -51,7 +50,7 @@ mod ed25519_benches {
let sig: Signature = keypair.sign(msg);

c.bench_function("Ed25519 strict signature verification", move |b| {
b.iter(| | keypair.verify_strict(msg, &sig))
b.iter(|| keypair.verify_strict(msg, &sig))
});
}

Expand All @@ -62,7 +61,8 @@ mod ed25519_benches {
"Ed25519 batch signature verification",
|b, &&size| {
let mut csprng: ThreadRng = thread_rng();
let keypairs: Vec<Keypair> = (0..size).map(|_| Keypair::generate(&mut csprng)).collect();
let keypairs: Vec<Keypair> =
(0..size).map(|_| Keypair::generate(&mut csprng)).collect();
let msg: &[u8] = b"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
let messages: Vec<&[u8]> = (0..size).map(|_| msg).collect();
let signatures: Vec<Signature> =
Expand All @@ -80,11 +80,11 @@ mod ed25519_benches {
let mut csprng: ThreadRng = thread_rng();

c.bench_function("Ed25519 keypair generation", move |b| {
b.iter(| | Keypair::generate(&mut csprng))
b.iter(|| Keypair::generate(&mut csprng))
});
}

criterion_group!{
criterion_group! {
name = ed25519_benches;
config = Criterion::default();
targets =
Expand All @@ -96,6 +96,4 @@ mod ed25519_benches {
}
}

criterion_main!(
ed25519_benches::ed25519_benches,
);
criterion_main!(ed25519_benches::ed25519_benches);