Merge branch 'develop' into next

This resolves the conflicts and gets the workspace `Cargo.toml`s to not be
invalid. It doesn't actually get clippy to pass again yet.

Does move `crypto/dkg/src/evrf` into a new `crypto/dkg/evrf` crate (which does
not yet compile).
This commit is contained in:
Luke Parker
2025-08-23 15:04:39 -04:00
319 changed files with 4016 additions and 26990 deletions

View File

@@ -1,6 +1,6 @@
[package]
name = "schnorr-signatures"
version = "0.5.1"
version = "0.5.2"
description = "Minimal Schnorr signatures crate hosting common code"
license = "MIT"
repository = "https://github.com/serai-dex/serai/tree/develop/crypto/schnorr"
@@ -23,7 +23,7 @@ rand_core = { version = "0.6", default-features = false }
zeroize = { version = "^1.5", default-features = false, features = ["zeroize_derive"] }
transcript = { package = "flexible-transcript", path = "../transcript", version = "^0.3.2", default-features = false }
transcript = { package = "flexible-transcript", path = "../transcript", version = "^0.3.2", default-features = false, optional = true }
ciphersuite = { path = "../ciphersuite", version = "^0.4.1", default-features = false, features = ["alloc"] }
multiexp = { path = "../multiexp", version = "0.4", default-features = false, features = ["batch"] }
@@ -36,8 +36,9 @@ rand_core = { version = "0.6", features = ["std"] }
sha2 = "0.10"
dalek-ff-group = { path = "../dalek-ff-group" }
ciphersuite = { path = "../ciphersuite", features = ["ed25519"] }
ciphersuite = { path = "../ciphersuite" }
[features]
std = ["std-shims/std", "rand_core/std", "zeroize/std", "transcript/std", "ciphersuite/std", "multiexp/std"]
aggregate = ["transcript"]
std = ["std-shims/std", "rand_core/std", "zeroize/std", "transcript?/std", "ciphersuite/std", "multiexp/std"]
default = ["std"]

View File

@@ -25,6 +25,7 @@ use ciphersuite::{
use multiexp::{multiexp_vartime, BatchVerifier};
/// Half-aggregation from <https://eprint.iacr.org/2021/350>.
#[cfg(feature = "aggregate")]
pub mod aggregate;
#[cfg(test)]

View File

@@ -3,16 +3,16 @@ use core::ops::Deref;
use zeroize::Zeroizing;
use rand_core::OsRng;
use dalek_ff_group::Ed25519;
use ciphersuite::{
group::{ff::Field, Group},
Ciphersuite, Ed25519,
Ciphersuite,
};
use multiexp::BatchVerifier;
use crate::{
SchnorrSignature,
aggregate::{SchnorrAggregator, SchnorrAggregate},
};
use crate::SchnorrSignature;
#[cfg(feature = "aggregate")]
use crate::aggregate::{SchnorrAggregator, SchnorrAggregate};
mod rfc8032;
@@ -77,6 +77,7 @@ pub(crate) fn batch_verify<C: Ciphersuite>() {
}
}
#[cfg(feature = "aggregate")]
pub(crate) fn aggregate<C: Ciphersuite>() {
const DST: &[u8] = b"Schnorr Aggregator Test";
@@ -117,5 +118,6 @@ fn test() {
sign::<Ed25519>();
verify::<Ed25519>();
batch_verify::<Ed25519>();
#[cfg(feature = "aggregate")]
aggregate::<Ed25519>();
}

View File

@@ -5,8 +5,8 @@
use sha2::{Digest, Sha512};
use dalek_ff_group::Scalar;
use ciphersuite::{group::GroupEncoding, Ciphersuite, Ed25519};
use dalek_ff_group::{Scalar, Ed25519};
use ciphersuite::{group::GroupEncoding, Ciphersuite};
use crate::SchnorrSignature;