mirror of
https://github.com/saymrwulf/risc0-curve25519-dalek-source.git
synced 2026-09-04 20:03:40 +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
|
||||
|
||||
* Update MSRV to 1.60.
|
||||
|
||||
## 2.0.0-pre.1
|
||||
|
||||
* Loosen restriction on zeroize dependency version from =1.3 to 1.
|
||||
|
|
|
|||
26
Cargo.toml
26
Cargo.toml
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "x25519-dalek"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
# Before changing this:
|
||||
# - update version in README.md
|
||||
# - update html_root_url
|
||||
|
|
@ -25,6 +25,7 @@ exclude = [
|
|||
".travis.yml",
|
||||
"CONTRIBUTING.md",
|
||||
]
|
||||
rust-version = "1.60"
|
||||
|
||||
[badges]
|
||||
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"]
|
||||
|
||||
[dependencies]
|
||||
curve25519-dalek = { version = "3", default-features = false }
|
||||
rand_core = { version = "0.6", default-features = false }
|
||||
# `serde` is renamed to `our_serde` in order to avoid a name collision between
|
||||
# importing the serde dependency and enabling the curve25519-dalek/serde feature
|
||||
our_serde = { package = "serde", version = "1", default-features = false, optional = true, features = ["derive"] }
|
||||
curve25519-dalek = { version = "4.0.0-pre.2", default-features = false }
|
||||
rand_core = { version = "0.6", default-features = false, features = ["getrandom"] }
|
||||
serde = { version = "1", default-features = false, optional = true, features = ["derive"] }
|
||||
zeroize = { version = "1", default-features = false, features = ["zeroize_derive"] }
|
||||
|
||||
[dev-dependencies]
|
||||
|
|
@ -50,12 +49,11 @@ name = "x25519"
|
|||
harness = false
|
||||
|
||||
[features]
|
||||
default = ["std", "u64_backend"]
|
||||
serde = ["our_serde", "curve25519-dalek/serde"]
|
||||
std = ["curve25519-dalek/std"]
|
||||
nightly = ["curve25519-dalek/nightly"]
|
||||
default = ["alloc"]
|
||||
serde = ["dep:serde", "curve25519-dalek/serde"]
|
||||
alloc = ["curve25519-dalek/alloc", "serde?/alloc"]
|
||||
reusable_secrets = []
|
||||
u64_backend = ["curve25519-dalek/u64_backend"]
|
||||
u32_backend = ["curve25519-dalek/u32_backend"]
|
||||
fiat_u64_backend = ["curve25519-dalek/fiat_u64_backend"]
|
||||
fiat_u32_backend = ["curve25519-dalek/fiat_u32_backend"]
|
||||
|
||||
|
||||
[patch.crates-io]
|
||||
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
|
||||
|
||||
Current MSRV is 1.51.
|
||||
Current MSRV is 1.60.
|
||||
|
||||
# Documentation
|
||||
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@
|
|||
//!
|
||||
//! # MSRV
|
||||
//!
|
||||
//! Current MSRV is 1.41 for production builds, and 1.48 for running tests.
|
||||
//! Current MSRV is 1.60.
|
||||
//!
|
||||
//! # Documentation
|
||||
//!
|
||||
|
|
|
|||
|
|
@ -31,11 +31,7 @@ use zeroize::Zeroize;
|
|||
/// 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
|
||||
/// for Drop or explicitly called.
|
||||
#[cfg_attr(feature = "serde", serde(crate = "our_serde"))]
|
||||
#[cfg_attr(
|
||||
feature = "serde",
|
||||
derive(our_serde::Serialize, our_serde::Deserialize)
|
||||
)]
|
||||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||
#[derive(PartialEq, Eq, Hash, Copy, Clone, Debug, Zeroize)]
|
||||
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
|
||||
/// secret keys are never reused, which can have very serious security
|
||||
/// implications for many protocols.
|
||||
#[cfg_attr(feature = "serde", serde(crate = "our_serde"))]
|
||||
#[cfg_attr(
|
||||
feature = "serde",
|
||||
derive(our_serde::Serialize, our_serde::Deserialize)
|
||||
)]
|
||||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||
#[derive(Clone, Zeroize)]
|
||||
#[zeroize(drop)]
|
||||
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
|
||||
/// 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.
|
||||
#[cfg_attr(feature = "serde", serde(crate = "our_serde"))]
|
||||
#[cfg_attr(
|
||||
feature = "serde",
|
||||
derive(our_serde::Serialize, our_serde::Deserialize)
|
||||
)]
|
||||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||
#[cfg_attr(feature = "serde", serde(remote = "Scalar"))]
|
||||
struct AllowUnreducedScalarBytes(
|
||||
#[cfg_attr(feature = "serde", serde(getter = "Scalar::to_bytes"))] [u8; 32],
|
||||
|
|
|
|||
Loading…
Reference in a new issue