mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-05 20:30:57 +00:00
bump MSRV to 1.60 and update to current curve25519-dalek
This commit is contained in:
parent
3fc0108d7d
commit
cf56e789ed
5 changed files with 19 additions and 31 deletions
|
|
@ -4,6 +4,8 @@ Entries are listed in reverse chronological order.
|
||||||
|
|
||||||
# 2.x Series
|
# 2.x Series
|
||||||
|
|
||||||
|
* Update MSRV to 1.60.
|
||||||
|
|
||||||
## 2.0.0-pre.1
|
## 2.0.0-pre.1
|
||||||
|
|
||||||
* Loosen restriction on zeroize dependency version from =1.3 to 1.
|
* Loosen restriction on zeroize dependency version from =1.3 to 1.
|
||||||
|
|
|
||||||
26
Cargo.toml
26
Cargo.toml
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "x25519-dalek"
|
name = "x25519-dalek"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
# Before changing this:
|
# Before changing this:
|
||||||
# - update version in README.md
|
# - update version in README.md
|
||||||
# - update html_root_url
|
# - update html_root_url
|
||||||
|
|
@ -25,6 +25,7 @@ exclude = [
|
||||||
".travis.yml",
|
".travis.yml",
|
||||||
"CONTRIBUTING.md",
|
"CONTRIBUTING.md",
|
||||||
]
|
]
|
||||||
|
rust-version = "1.60"
|
||||||
|
|
||||||
[badges]
|
[badges]
|
||||||
travis-ci = { repository = "dalek-cryptography/x25519-dalek", branch = "master"}
|
travis-ci = { repository = "dalek-cryptography/x25519-dalek", branch = "master"}
|
||||||
|
|
@ -34,11 +35,9 @@ travis-ci = { repository = "dalek-cryptography/x25519-dalek", branch = "master"}
|
||||||
features = ["nightly", "reusable_secrets", "serde"]
|
features = ["nightly", "reusable_secrets", "serde"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
curve25519-dalek = { version = "3", default-features = false }
|
curve25519-dalek = { version = "4.0.0-pre.2", default-features = false }
|
||||||
rand_core = { version = "0.6", default-features = false }
|
rand_core = { version = "0.6", default-features = false, features = ["getrandom"] }
|
||||||
# `serde` is renamed to `our_serde` in order to avoid a name collision between
|
serde = { version = "1", default-features = false, optional = true, features = ["derive"] }
|
||||||
# importing the serde dependency and enabling the curve25519-dalek/serde feature
|
|
||||||
our_serde = { package = "serde", version = "1", default-features = false, optional = true, features = ["derive"] }
|
|
||||||
zeroize = { version = "1", default-features = false, features = ["zeroize_derive"] }
|
zeroize = { version = "1", default-features = false, features = ["zeroize_derive"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|
@ -50,12 +49,11 @@ name = "x25519"
|
||||||
harness = false
|
harness = false
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["std", "u64_backend"]
|
default = ["alloc"]
|
||||||
serde = ["our_serde", "curve25519-dalek/serde"]
|
serde = ["dep:serde", "curve25519-dalek/serde"]
|
||||||
std = ["curve25519-dalek/std"]
|
alloc = ["curve25519-dalek/alloc", "serde?/alloc"]
|
||||||
nightly = ["curve25519-dalek/nightly"]
|
|
||||||
reusable_secrets = []
|
reusable_secrets = []
|
||||||
u64_backend = ["curve25519-dalek/u64_backend"]
|
|
||||||
u32_backend = ["curve25519-dalek/u32_backend"]
|
|
||||||
fiat_u64_backend = ["curve25519-dalek/fiat_u64_backend"]
|
[patch.crates-io]
|
||||||
fiat_u32_backend = ["curve25519-dalek/fiat_u32_backend"]
|
curve25519-dalek = { git = "https://github.com/dalek-cryptography/curve25519-dalek", branch = "release/4.0" }
|
||||||
|
|
@ -107,7 +107,7 @@ x25519-dalek = "2.0.0-pre.0"
|
||||||
|
|
||||||
# MSRV
|
# MSRV
|
||||||
|
|
||||||
Current MSRV is 1.51.
|
Current MSRV is 1.60.
|
||||||
|
|
||||||
# Documentation
|
# Documentation
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,7 @@
|
||||||
//!
|
//!
|
||||||
//! # MSRV
|
//! # MSRV
|
||||||
//!
|
//!
|
||||||
//! Current MSRV is 1.41 for production builds, and 1.48 for running tests.
|
//! Current MSRV is 1.60.
|
||||||
//!
|
//!
|
||||||
//! # Documentation
|
//! # Documentation
|
||||||
//!
|
//!
|
||||||
|
|
|
||||||
|
|
@ -31,11 +31,7 @@ use zeroize::Zeroize;
|
||||||
/// should they wish to erase public keys from memory. Note that this erasure
|
/// should they wish to erase public keys from memory. Note that this erasure
|
||||||
/// (in this crate) does *not* automatically happen, but either must be derived
|
/// (in this crate) does *not* automatically happen, but either must be derived
|
||||||
/// for Drop or explicitly called.
|
/// for Drop or explicitly called.
|
||||||
#[cfg_attr(feature = "serde", serde(crate = "our_serde"))]
|
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||||
#[cfg_attr(
|
|
||||||
feature = "serde",
|
|
||||||
derive(our_serde::Serialize, our_serde::Deserialize)
|
|
||||||
)]
|
|
||||||
#[derive(PartialEq, Eq, Hash, Copy, Clone, Debug, Zeroize)]
|
#[derive(PartialEq, Eq, Hash, Copy, Clone, Debug, Zeroize)]
|
||||||
pub struct PublicKey(pub(crate) MontgomeryPoint);
|
pub struct PublicKey(pub(crate) MontgomeryPoint);
|
||||||
|
|
||||||
|
|
@ -159,11 +155,7 @@ impl<'a> From<&'a ReusableSecret> for PublicKey {
|
||||||
/// [`EphemeralSecret`] at all times, as that type enforces at compile-time that
|
/// [`EphemeralSecret`] at all times, as that type enforces at compile-time that
|
||||||
/// secret keys are never reused, which can have very serious security
|
/// secret keys are never reused, which can have very serious security
|
||||||
/// implications for many protocols.
|
/// implications for many protocols.
|
||||||
#[cfg_attr(feature = "serde", serde(crate = "our_serde"))]
|
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||||
#[cfg_attr(
|
|
||||||
feature = "serde",
|
|
||||||
derive(our_serde::Serialize, our_serde::Deserialize)
|
|
||||||
)]
|
|
||||||
#[derive(Clone, Zeroize)]
|
#[derive(Clone, Zeroize)]
|
||||||
#[zeroize(drop)]
|
#[zeroize(drop)]
|
||||||
pub struct StaticSecret(
|
pub struct StaticSecret(
|
||||||
|
|
@ -328,11 +320,7 @@ pub const X25519_BASEPOINT_BYTES: [u8; 32] = [
|
||||||
/// Derived serialization methods will not work on a StaticSecret because x25519 requires
|
/// Derived serialization methods will not work on a StaticSecret because x25519 requires
|
||||||
/// non-canonical scalars which are rejected by curve25519-dalek. Thus we provide a way to convert
|
/// non-canonical scalars which are rejected by curve25519-dalek. Thus we provide a way to convert
|
||||||
/// the bytes directly to a scalar using Serde's remote derive functionality.
|
/// the bytes directly to a scalar using Serde's remote derive functionality.
|
||||||
#[cfg_attr(feature = "serde", serde(crate = "our_serde"))]
|
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||||
#[cfg_attr(
|
|
||||||
feature = "serde",
|
|
||||||
derive(our_serde::Serialize, our_serde::Deserialize)
|
|
||||||
)]
|
|
||||||
#[cfg_attr(feature = "serde", serde(remote = "Scalar"))]
|
#[cfg_attr(feature = "serde", serde(remote = "Scalar"))]
|
||||||
struct AllowUnreducedScalarBytes(
|
struct AllowUnreducedScalarBytes(
|
||||||
#[cfg_attr(feature = "serde", serde(getter = "Scalar::to_bytes"))] [u8; 32],
|
#[cfg_attr(feature = "serde", serde(getter = "Scalar::to_bytes"))] [u8; 32],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue