Bump digest, ed25519, signature, and sha2 (#676)

Bumps the aforementioned dependencies to their latest (pre)releases.
This commit is contained in:
Tony Arcieri 2025-07-07 11:34:26 -06:00 committed by GitHub
parent 0736088c94
commit a9aa94736b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 26 additions and 30 deletions

View file

@ -30,7 +30,7 @@ rustdoc-args = [
features = ["serde", "rand_core", "digest", "legacy_compatibility", "group-bits"]
[dev-dependencies]
sha2 = { version = "0.10", default-features = false }
sha2 = { version = "0.11.0-rc.0", default-features = false }
bincode = "1"
criterion = { version = "0.5", features = ["html_reports"] }
hex = "0.4.2"
@ -50,8 +50,8 @@ cfg-if = "1"
ff = { version = "0.13", default-features = false, optional = true }
group = { version = "0.13", default-features = false, optional = true }
rand_core = { version = "0.6.4", default-features = false, optional = true }
digest = { version = "0.10", default-features = false, optional = true }
subtle = { version = "2.6.0", default-features = false, features = ["const-generics"]}
digest = { version = "0.11.0-rc.0", default-features = false, optional = true, features = ["block-api"] }
subtle = { version = "2.6.0", default-features = false, features = ["const-generics"] }
serde = { version = "1.0", default-features = false, optional = true, features = ["derive"] }
zeroize = { version = "1", default-features = false, optional = true }
@ -68,7 +68,7 @@ precomputed-tables = []
legacy_compatibility = []
group = ["dep:group", "rand_core"]
group-bits = ["group", "ff/bits"]
digest = ["dep:digest", "digest/core-api"]
digest = ["dep:digest"]
[target.'cfg(all(not(curve25519_dalek_backend = "fiat"), not(curve25519_dalek_backend = "serial"), target_arch = "x86_64"))'.dependencies]
curve25519-dalek-derive = { version = "0.1", path = "../curve25519-dalek-derive" }

View file

@ -106,8 +106,8 @@ use core::ops::{Mul, MulAssign};
#[cfg(feature = "digest")]
use digest::{
Digest, FixedOutput, HashMarker, consts::True, crypto_common::BlockSizeUser,
generic_array::typenum::U64, typenum::IsGreater,
Digest, FixedOutput, HashMarker, array::typenum::U64, consts::True,
crypto_common::BlockSizeUser, typenum::IsGreater,
};
#[cfg(feature = "group")]

View file

@ -38,8 +38,8 @@ use crate::constants;
#[cfg(feature = "digest")]
use digest::{
Digest, FixedOutput, HashMarker,
core_api::BlockSizeUser,
generic_array::{GenericArray, typenum::U64},
array::{Array, typenum::U64},
block_api::BlockSizeUser,
typenum::{IsGreater, True},
};
@ -368,7 +368,7 @@ impl FieldElement {
D::BlockSize: IsGreater<D::OutputSize, Output = True>,
{
let l_i_b_str = 48u16.to_be_bytes();
let z_pad = GenericArray::<u8, D::BlockSize>::default();
let z_pad = Array::<u8, D::BlockSize>::default();
let mut hasher = D::new().chain_update(z_pad);

View file

@ -175,7 +175,7 @@ use rand_core::CryptoRngCore;
#[cfg(feature = "digest")]
use digest::Digest;
#[cfg(feature = "digest")]
use digest::generic_array::typenum::U64;
use digest::array::typenum::U64;
use crate::constants;
use crate::field::FieldElement;

View file

@ -136,7 +136,7 @@ use rand_core::CryptoRngCore;
#[cfg(feature = "digest")]
use digest::Digest;
#[cfg(feature = "digest")]
use digest::generic_array::typenum::U64;
use digest::array::typenum::U64;
use subtle::Choice;
use subtle::ConditionallySelectable;

View file

@ -27,9 +27,9 @@ features = ["batch", "digest", "hazmat", "pem", "serde"]
[dependencies]
curve25519-dalek = { version = "=5.0.0-pre", path = "../curve25519-dalek", default-features = false, features = ["digest"] }
ed25519 = { version = ">=2.2, <2.3", default-features = false }
signature = { version = ">=2.0, <2.3", optional = true, default-features = false }
sha2 = { version = "0.10", default-features = false }
ed25519 = { version = "=3.0.0-pre.0", default-features = false }
signature = { version = "=3.0.0-rc.1", optional = true, default-features = false }
sha2 = { version = "0.11.0-rc.0", default-features = false }
subtle = { version = "2.3.0", default-features = false }
# optional features
@ -41,8 +41,8 @@ zeroize = { version = "1.5", default-features = false, optional = true }
[dev-dependencies]
curve25519-dalek = { version = "=5.0.0-pre", path = "../curve25519-dalek", default-features = false, features = ["digest", "rand_core"] }
x25519-dalek = { version = "=3.0.0-pre", path = "../x25519-dalek", default-features = false, features = ["static_secrets"] }
blake2 = "0.10"
sha3 = "0.10"
blake2 = "0.11.0-rc.0"
sha3 = "0.11.0-rc.0"
hex = "0.4"
bincode = "1.0"
serde_json = "1.0"
@ -62,10 +62,9 @@ required-features = ["rand_core"]
[features]
default = ["fast", "std", "zeroize"]
alloc = ["curve25519-dalek/alloc", "ed25519/alloc", "serde?/alloc", "zeroize?/alloc"]
std = ["alloc", "ed25519/std", "serde?/std", "sha2/std"]
alloc = ["curve25519-dalek/alloc", "ed25519/alloc", "signature/alloc", "serde?/alloc", "zeroize?/alloc"]
std = ["alloc", "ed25519/std", "serde?/std"]
asm = ["sha2/asm"]
batch = ["alloc", "dep:keccak", "rand_core"]
fast = ["curve25519-dalek/precomputed-tables"]
digest = ["signature/digest"]

View file

@ -13,12 +13,10 @@
// Display) should be snake cased, for some reason.
#![allow(non_snake_case)]
use core::error::Error;
use core::fmt;
use core::fmt::Display;
#[cfg(feature = "std")]
use std::error::Error;
/// Internal errors. Most application-level developers will likely not
/// need to pay any attention to these.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
@ -87,7 +85,6 @@ impl Display for InternalError {
}
}
#[cfg(feature = "std")]
impl Error for InternalError {}
/// Errors which may occur while processing signatures and keypairs.
@ -107,12 +104,12 @@ impl Error for InternalError {}
pub type SignatureError = ed25519::signature::Error;
impl From<InternalError> for SignatureError {
#[cfg(not(feature = "std"))]
#[cfg(not(feature = "alloc"))]
fn from(_err: InternalError) -> SignatureError {
SignatureError::new()
}
#[cfg(feature = "std")]
#[cfg(feature = "alloc")]
fn from(err: InternalError) -> SignatureError {
SignatureError::from_source(err)
}

View file

@ -25,7 +25,7 @@ use zeroize::{Zeroize, ZeroizeOnDrop};
// These are used in the functions that are made public when the hazmat feature is set
use crate::{Signature, VerifyingKey};
use curve25519_dalek::digest::{Digest, generic_array::typenum::U64};
use curve25519_dalek::digest::{Digest, array::typenum::U64};
/// Contains the secret scalar and domain separator used for generating signatures.
///

View file

@ -24,7 +24,7 @@ use sha2::Sha512;
use subtle::{Choice, ConstantTimeEq};
use curve25519_dalek::{
digest::{Digest, generic_array::typenum::U64},
digest::{Digest, array::typenum::U64},
edwards::{CompressedEdwardsY, EdwardsPoint},
scalar::Scalar,
};
@ -734,10 +734,10 @@ impl From<&SigningKey> for pkcs8::KeypairBytes {
}
#[cfg(feature = "pkcs8")]
impl TryFrom<pkcs8::PrivateKeyInfo<'_>> for SigningKey {
impl TryFrom<pkcs8::PrivateKeyInfoRef<'_>> for SigningKey {
type Error = pkcs8::Error;
fn try_from(private_key: pkcs8::PrivateKeyInfo<'_>) -> pkcs8::Result<Self> {
fn try_from(private_key: pkcs8::PrivateKeyInfoRef<'_>) -> pkcs8::Result<Self> {
pkcs8::KeypairBytes::try_from(private_key)?.try_into()
}
}

View file

@ -13,7 +13,7 @@ use core::fmt::Debug;
use core::hash::{Hash, Hasher};
use curve25519_dalek::{
digest::{Digest, generic_array::typenum::U64},
digest::{Digest, array::typenum::U64},
edwards::{CompressedEdwardsY, EdwardsPoint},
montgomery::MontgomeryPoint,
scalar::Scalar,