Skip to content

Commit

Permalink
Mark x25519-dalek version 2 as stable
Browse files Browse the repository at this point in the history
  • Loading branch information
elichai committed Jul 27, 2023
1 parent e44d4b5 commit dd00388
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions x25519-dalek/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
# - update html_root_url
# - update CHANGELOG
# - if any changes were made to README.md, mirror them in src/lib.rs docs
version = "2.0.0-rc.3"
version = "2.0.0"
authors = [
"Isis Lovecruft <isis@patternsinthevoid.net>",
"DebugSteven <debugsteven@gmail.com>",
Expand Down Expand Up @@ -38,14 +38,14 @@ rustdoc-args = [
features = ["getrandom", "reusable_secrets", "serde", "static_secrets"]

[dependencies]
curve25519-dalek = { version = "4", path = "../curve25519-dalek", default-features = false }
curve25519-dalek = { version = "4", default-features = false }
rand_core = { version = "0.6", default-features = false }
serde = { version = "1", default-features = false, optional = true, features = ["derive"] }
zeroize = { version = "1", default-features = false, optional = true, features = ["zeroize_derive"] }

[dev-dependencies]
bincode = "1"
criterion = "0.4.0"
criterion = "0.5"
rand_core = { version = "0.6", default-features = false, features = ["getrandom"] }

[[bench]]
Expand Down
14 changes: 7 additions & 7 deletions x25519-dalek/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ shared secret with Bob by doing:
```rust
# use rand_core::OsRng;
# use x25519_dalek::{EphemeralSecret, PublicKey};
# let alice_secret = EphemeralSecret::new(OsRng);
# let alice_secret = EphemeralSecret::random_from_rng(OsRng);
# let alice_public = PublicKey::from(&alice_secret);
# let bob_secret = EphemeralSecret::new(OsRng);
# let bob_secret = EphemeralSecret::random_from_rng(OsRng);
# let bob_public = PublicKey::from(&bob_secret);
let alice_shared_secret = alice_secret.diffie_hellman(&bob_public);
```
Expand All @@ -65,9 +65,9 @@ Similarly, Bob computes a shared secret by doing:
```rust
# use rand_core::OsRng;
# use x25519_dalek::{EphemeralSecret, PublicKey};
# let alice_secret = EphemeralSecret::new(OsRng);
# let alice_secret = EphemeralSecret::random_from_rng(OsRng);
# let alice_public = PublicKey::from(&alice_secret);
# let bob_secret = EphemeralSecret::new(OsRng);
# let bob_secret = EphemeralSecret::random_from_rng(OsRng);
# let bob_public = PublicKey::from(&bob_secret);
let bob_shared_secret = bob_secret.diffie_hellman(&alice_public);
```
Expand All @@ -77,9 +77,9 @@ These secrets are the same:
```rust
# use rand_core::OsRng;
# use x25519_dalek::{EphemeralSecret, PublicKey};
# let alice_secret = EphemeralSecret::new(OsRng);
# let alice_secret = EphemeralSecret::random_from_rng(OsRng);
# let alice_public = PublicKey::from(&alice_secret);
# let bob_secret = EphemeralSecret::new(OsRng);
# let bob_secret = EphemeralSecret::random_from_rng(OsRng);
# let bob_public = PublicKey::from(&bob_secret);
# let alice_shared_secret = alice_secret.diffie_hellman(&bob_public);
# let bob_shared_secret = bob_secret.diffie_hellman(&alice_public);
Expand All @@ -100,7 +100,7 @@ To install, add the following to your project's `Cargo.toml`:

```toml
[dependencies]
x25519-dalek = "2.0.0-rc.3"
x25519-dalek = "2"
```

# MSRV
Expand Down
2 changes: 1 addition & 1 deletion x25519-dalek/src/x25519.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl EphemeralSecret {
/// Generate a new [`EphemeralSecret`].
#[cfg(feature = "getrandom")]
pub fn random() -> Self {
Self::random_from_rng(&mut rand_core::OsRng)
Self::random_from_rng(rand_core::OsRng)
}
}

Expand Down

0 comments on commit dd00388

Please sign in to comment.